Search here for all the info you want in this Blog

String functions


String functions


q VBScript supports the following commonly used string functions:
q InStr(sString, sSubString) - Returns the position of the first occurrence of one string within another. The search begins at the first character of the string
q InStrRev(sString, sSubString) - Returns the position of the first occurrence of one string within another. The search begins at the last character of the string
q LCase(sString) - Converts a specified string to lowercase
q Left(sString, iLen) - Returns a specified number of characters from the left side of a string
q Len(sString) - Returns the number of characters in a string
q LTrim(sString) - Removes spaces on the left side of a string
q RTrim(sString) - Removes spaces on the right side of a string
q Trim(sString) - Removes spaces on both the left and the right side of a string
q Mid(sString, iStart, iLen) - Returns a specified number of characters from a string
q Replace(sString, sOld, sNew) - Replaces a specified part of a string with another string a specified number of times
q Right(sString, iLen) - Returns a specified number of characters from the right side of a string
q Space(iLen) - Returns a string that consists of a specified number of spaces
q StrComp(sString1, sString2) - Compares two strings and returns a value that represents the result of the comparison
q String(iLen, sChar, iLen) - Returns a string that contains a repeating character of a specified length
q StrReverse(sString) - Reverses a string
q UCase(sString) - Converts a specified string to uppercase
q Asc(sString) - Converts the first letter in a string to ANSI code
q Chr(iInteger) - Converts the specified ANSI code to a character 

No comments:

Post a Comment