VBScript: Strings, You Can`t Function without Them
(Page 1 of 6 )
Welcome back to the third, and hopefully final, chapter in our series on VBScript string functions. So far we have covered nine of the sixteen built-in string functions available. In this article, with any luck, we will get to the remaining seven. So strap in, we have a lot of ground to cover.
Among those covered were the InStr() and InStrRev(), which allowed us to test whether a character or string was contained within another string, and the LCase() and UCase(), which converted strings to lowercase and uppercase respectively. After that we discussed the Right(), Left(), and Mid() functions, which let us, for lack of a better term, parse out a section of a string. Finally, we covered Len(), which counted the number of characters in a string.
Here and now, we will take a heartbreaking last look at our dear friend the String Function Table, and then learn about the next subject on the block, the Trim() functions. So get out your razors and shaving cream, and get prepared to lose that precious peach fuzz you call a mustache.
Function | What It Does |
InStr | Used to return the position of the first occurrence of a string within another string |
InStrRev | Same as InStr only it begins searching from the last character of the string |
LCase | Takes a string and converts it to lowercase |
UCase | Takes a string and converts it to uppercase |
Left | Used to return a number of characters you specify from the left side of a string |
Right | Used to return a number of characters you specify from the right side of a string |
Mid | Used to return a number of characters you specify from a string |
Len | Used to return the number of characters in a string |
LTrim | Used to remove spaces from the left side of a string |
RTrim | Used to remove spaces from the right side of a string |
Trim | Used to remove spaces from both the left and right side of a string |
Replace | Used to replace a part of a string with another string a number of times you specify |
Space | Used to return a string made up of a number of spaces you specify |
StrComp | Used to compare two strings. Returns a value representing the results. |
StrReverse | Used to reverse a string |
String | Used to return a string that repeats a character a number of times you specify |
Next: LTrim That Hair You Hippie! >>
More Windows Scripting Articles
More By James Payne