Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text manipulation

Status
Not open for further replies.
Oct 10, 2003
90
US
Hello again, been out for awhile so I may have lost some ground on learning Vb scripting.

My question this time around....

The left command will return the first X values from a given string. Is there an equivialent command that will delete the first X values from the left?
 
Not specifically, but you can use Right to get the same result:

nNumberOfCharToRemove = 5
strBefore = "abcdefghijklmnopqrstuvwxyz"
strAfter = Right(strBefore, Len(strBefore) - nNumberOfCharToRemove)
WScript.Echo strAfter

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
Or:

nNumberOfCharToRemove = 5
strBefore = "abcdefghijklmnopqrstuvwxyz"
strAfter = Mid(strBefore, nNumberOfCharToRemove + 1)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top