This paper brings together the common functions in ASP
function Syntax function
LenLen (Stringvarname) returns the number of characters within a string, or the number of bytes required to store a variable.
TrimTrim (string) to remove spaces before and after a string
LtrimLtrim (String) removes the space before the string
RtrimRtrim (String) removes the space following the string
MidMid (string,start,length) Gets a length string from the start character of the string string, if the third argument is omitted to represent a string starting from the start character to the end of the string
LeftLeft (string,length) gets a length string from the left-hand side of a string string
RightRight (string,length) gets a length string from the right-hand side of the string string
LCaseLCase (String) converts all uppercase letters in string strings to lowercase letters
UCaseUCase (String) converts all uppercase letters in string strings to uppercase letters
StrCompStrComp (String1,string2[,compare]) returns a comparison between a string1 string and a string2 string, if two strings are the same, returns 0 if less than 1, or 1 if greater than
InStrINSTR (String1,string2[,compare]) returns the position of the first occurrence of the string1 string in the string2 string
SplitSplit (String1,delimiter[,count[,start]) splits the string into a one-dimensional array based on delimiter, where delimiter is used to identify the substring bounds. If omitted, use a space ("") as the separator. The number of substrings returned by count,-1 indicates that all substrings are returned. Start is 1 to perform a text comparison, if 0 or omit to perform a binary comparison.
Replace replace (Expression,find,replacewith[,compare[,count[,start]]) returns a string in which a specified number of substrings (find) is replaced with another substring ( replacewith).
Add:
The ASC ASC function extracts the ANSI character code of the first letter of a string.
Usage is: result = ASC (string)
Where result is the character code and string is any valid string expression. If string is empty, a real-time error is generated.
AscB The ASCB function extracts the first byte of a string.
Usage is: result = AscB (string)
Where result is a byte class, and string is any valid string expression. If string is empty, a real-time error is generated.
ASCW The ASCW function extracts the Unicode character code for the first letter of the string.
Usage is: result = AscW (string)
Where result is unicode,string is any valid string expression. If string is empty, a real-time error is generated.
InStr The InStr function recognizes the first letter position of a token in a string.
Usage: Newstart = INSTR ([Start,]source, token[, compare])
Where Newstart the position of the notation in the string (if not, 0), start is the starting position of the lookup, source is the string to find, token is the string to locate, compare is the comparison type (0 represents the binary comparison, 1 indicates a text comparison that ignores case.
InStrB The INSTRB function is a InStr byte version that identifies the first byte position of a token in a string.
Usage: Newstart = InStrB ([Start,]source, token[, compare])
Where Newstart is the first byte position in the string (if not, 0), start is the starting position of the lookup, source is the string to find, token is the string to locate, compare is the comparison type (0 represents the binary comparison, 1 indicates a text comparison that ignores case.
LCase The LCase function changes the string to lowercase.
Usage is: result = LCase (string)
Where result is a lowercase string, and string is any valid string expression.
Left The left function extracts the specified number of characters from the beginning of the string.
Usage is: result = Left (string,length)
Where result is a string variable, string is a valid string expression, and length is a numeric expression that represents how many characters are returned.
LeftB The LEFTB function extracts the specified number of bytes from the beginning of the string.
Usage is: result = LeftB (string,length)
Where result is a string variable, string is a valid string expression, and length is a numeric expression that represents the number of bytes fetched.
Len The Len function determines the size of the string or how many characters are required to store the variable.
Usage is: result = Len (string varname)
Where result is the number of characters in the string or the number of bytes required to store it, string is any valid string expression, and varname is the variable name.
LenB The Len function determines the size of the string or how many bytes are required to store the variable.
Usage is: result = LenB (string varname)
Where result is the number of bytes in the string or the number of bytes required to store it, string is any valid string expression, and varname is the variable name.
LTrim The LTrim function copies the string and removes the preceding space.
Usage is: result = LTrim (string)
Where result is a string that is removed from the space, string is a valid string expression to remove the space.
The mid mid function copies a specified number of characters from a location in a string.
Usage is: result = Mid (String,start[,length])
Where result is the resulting string, string is the expression from which to copy the character, start is the starting position of the copy in string, and length is the number of characters to copy.
MidB The mid function copies a specified number of bytes from a location in the string.
Usage is: result = Mid (String,start[,length])
Where result is the resulting string, string is the expression from which to copy the Byte, start is the starting position of the copy in string, and length is the number of bytes to copy.
Right The right function extracts a specified number of characters from the tail of the string.
Usage is: result = right (String,length)
Where result is a string variable, string is a valid string expression, and length is a numeric expression that represents how many characters are returned.
RIGHTB The RIGHTB function extracts the specified number of bytes from the beginning of the string.
Usage is: result = RIGHTB (string,length)
Where result is a string variable, string is a valid string expression, and length is a numeric expression that represents the number of bytes fetched.
RTrim The RTrim function copies the string and removes the trailing space.
Usage is: result = RTrim (string)
Where result is a string that is removed from the space, string is a valid string expression to remove the space.
String The string function constructs a string containing multiple identical characters.
Usage is: result = String (number, character)
Where result is a string variable, number is the length of the string returned, and character is the character code used to construct the return string.
Trim The Trim function copies the string and removes the trailing spaces.
Usage is: result = Trim (string)
Where result is a string that is removed from the space, string is a valid string expression to remove the space.
UCase The UCase function turns the string into uppercase.
Usage is: result = UCase (string)
Where result is an uppercase string and string is any valid string expression.