Scripting Home > Code Snippets > String Functions

Asc() - Returns ANSI Character Code
The Asc() function returns the ANSI character code for the first letter of the string provided.

Chr() - Returns Character from ANSI Code
The Chr() function returns the character associated with the specified ANSI character code.

InStr() - Find a string within another
The InStr() function returns the position of the first occurrence of one string within another.

InStrRev() - Find a string within another (Reverse)
The InStrRev() function returns the position of an occurrence of one string within another, starting from the end of string.

LCase() - Convert a string to lowercase
The LCase() function converts the supplied string to the lowercase equivalent.

Left() - Crops a string from left
The Left() function returns an optional number of characters of the supplied string starting from the left.

Len() - Determine the length of a string
The Len() function is used to determine the length or number of characters in a string.

LTrim() - Remove leading spaces from a string
The LTrim() function is used to remove the leading spaces from a string.

Mid() - Crops a string
The Mid() function returns an optional number of characters of the supplied string starting from the specified start position.

Replace() - Replace a substring within a string
The Replace() function is used to replace a specified substring with an alternate substring within a string.

Right() - Crops a string from right
The Right() function returns an optional number of characters of the supplied string starting from the right.

RTrim() - Remove trailing spaces from a string
The RTrim() function is used to remove the trailing spaces from a string.

Space() - Creates a string with the specified number of spaces
The Space() function creates a string including the specified number of spaces.

StrComp() - Compare two strings
The StrComp() function compares two strings and returns whether they are equal or not.

String() - Creates a repeated character string
The String() function creates a string of optional length filled with the specified character.

StrReverse() - Reverse the characters of a string
The StrReverse() function creates a string in which the character order of a specified string is reversed.

Trim() - Remove both leading and trailing spaces from a string
The Trim() function is used to remove both the leading and trailing spaces from a string.

UCase() - Convert a string to uppercase
The UCase() function converts the supplied string to the uppercase equivalent.