VBScript String Functions Options

davegate Posts: 182 Points: 894
Posted: Friday, February 26, 2016 8:20:53 AM

Vbscript string functions provide the functionality to perform various actions on string type values stored in the vbscript variable. Vbscript string functions allow you to search and match the specified pattern in the string, replace the matched substring with other substring, remove the leading or trailing white spaces from the string, change the case of letters of string to lowercase or uppercase, retrieve the substring of specified length from the provided string and get the length of the string. Each type of string manipulation action has different function in vbscript. You can combine the vbscript string functions with some logic to extract the desired substring or manipulate the part of the string.

Function Description
InStr Returns the position of the first occurrence of one string within another. The search begins at the first character of the string
InStrRev Returns the position of the first occurrence of one string within another. The search begins at the last character of the string
LCase Converts a specified string to lowercase
Left Returns a specified number of characters from the left side of a string
Len Returns the number of characters in a string
LTrim Removes spaces on the left side of a string
RTrim Removes spaces on the right side of a string
Trim Removes spaces on both the left and the right side of a string
Mid Returns a specified number of characters from a string
Replace Replaces a specified part of a string with another string a specified number of times
Right Returns a specified number of characters from the right side of a string
Space Returns a string that consists of a specified number of spaces
StrComp Compares two strings and returns a value that represents the result of the comparison
String Returns a string that contains a repeating character of a specified length
StrReverse Reverses a string
UCase Converts a specified string to uppercase
 
Users browsing this topic
Guest