VBScript offers a number of functions for manipulating text strings. We’re going to cover the syntax of these functions below and provide examples of how they can be used.
If you know specifically which string function you are looking for, click its name below and you will jump straight to that example:
- CStr (convert a value to a string)
- InStr (is one string found inside another)
- InStrRev (starting at the end of the string, is one string found inside another)
- LCase (convert the string to all lowercase)
- Left (retrieve a number of characters from the left or start of the string)
- Len (return the length of the entire string)
- LTrim (Remove spaces from the start of the string)
- Mid (Return a specific number of characters from within the string)
- Replace (Replace a specific set of characters in the string with a different set of characters)
- Right (return a number of characters from the end of the string)
- RTrim (Remove spaces from the end of the string)
- Space (return a string consisting of a specific number of spaces)
- StrComp (compare two strings and return a result)
- String (return a string that contains a specific number of a single character)
- StrReverse (reverse the contents of a string)
- Trim (Removes from both ends of the string)
- UCase (convert the string to uppercase)
Detailed information appears for each function.
Continue reading “VBScript String Functions and How to Use Them” »