volkware.com Login Features Help Register Admin

vbScript String Functions

FunctionDescriptionSample ArgumentsSample Result
Asc(string)Returns the ASCII character code asscociated with the first character in string.
View complete ASCII character code set.
"Alpha"65
Chr(charcode)Returns the character asscociated with ASCII charcter code charcode.
View complete ASCII character code set.
65A
CStr(expression)Returns a string representation of expression.5+510
InStr([start,]string,substring) Returns position of first occurence of substring within string.
Returns position of first occurence of substring within string starting with the start character in string.
"Two words","w"
3,"Two words","w"
2
5
InStrRev(string,substring[,start]) Returns position of first occurence of substring within string starting from the end of string and searching backwards.
Returns position of first occurence of substring within string starting with the start character in string and searching backwards.
"1234567890123","3"
"1234567890123","3",5
13
3
Join(stringarray[,delimter])Returns a string formed by concatenating the elements of stringarray. Array("one","two","three")
Array("one","two","three"),"*"
one two three
one*two*three
LCase(string)Returns lower case represenatation of string."LOWERCASE"lowercase
Left(string,number)Returns the left most number characters of string."Left Nine Characters.",9Left Nine
Len(string)Returns the length of string."This string is 34 characters long."34
LTrim(string)Returns string representation of string with leading spaces removed."     No leading spaces."No leading spaces.
Mid(string,start[,length]) Returns portion of string starting from the start character in string.
Returns length characters of string starting from the start character in string.
"This is the middle of the string.",13
"This is the middle of the string.",13,6
middle of the string.
middle
Replace(string,find,replace)Replaces all occurences of find with replace in string."The full name of Bob is Bob B. Jones","Bob","Robert"The full name of Robert is Robert B. Jones
Right(string,number)Returns the right most number characters of string."These characters are the Right Ten.",10Right Ten.
RTrim(string)Returns string representation of string with trailing spaces removed."No trailing spaces.     "No trailing spaces.
Space(number)Returns a string containing number spaces.10  
Split(string[,delimter])Returns a string array formed by splitting string into elements. "How now brown cow?"
"How now, brown cow?",","
Array("How","now","brown","cow?")
Array("How now"," brown cow?")
StrComp(string1,string2)Returns a 1, 0, or -1 if string1 is greater than, equal to , or less than string2 respectively. "beta","alpha"
"alpha","alpha"
"alpha","beta"
1
0
-1
StrReverse(string)Returns a string with characters in the reverse order of string.".redro esrever ni gnirts tupni eht si sihT"This is the input string in reverse order.
String(number,charcode)Returns a string containing number repetitions of the ASCII character associated with character code charcode.10,65AAAAAAAAAA
Trim(string)Returns string representation of string with leading and trailing spaces removed."     No leading or trailing spaces.     "No leading or trailing spaces.
UCase(string)Returns upper case represenatation of string."uppercase"UPPERCASE



volkware
Copyright © 1999-2000, Applied Web Engineering Corporation
All Rights Reserved