VBScript: Functioning with Strings (Page 1 of 4 )
In this continuing series on VBScript functions, I will cover the string functions. In the past, we went over date, time, and array functions. There are not quite as many built-in string functions in the language as there are date/time functions, but what it lacks in quantity, it more than makes up for in quality.
So enough blabbering on about it. Take a look at the following table, admire the cold black borders, the bold text, and most importantly, the archaic definitions, which are sure to baffle your feeble minds.
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 lower case. |
UCase | Takes a string and converts it to upper case. |
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 the 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 the number of times you specify. |
Next: Checking If It’s In With the InStr() Function >>
More Windows Scripting Articles
More By James Payne