Reference Manual - Table of Contents
String Functions Function Summary:
var = Asc ( text$ )
var$ = Chr ( numeric-expression )
var$ = Left ( text$, numOfChars )
var$ = Right ( text$, numOfChars )
var$ = Mid ( text$, startPos, numOfChars )
var$ = Lcase ( text$ )
var$ = Ucase ( text$ )
var$ = Trim ( text$ )
var$ = Ltrim ( text$ )
var$ = Rtrim ( text$ )
var$ = Str ( numeric-expression )
var$ = Str ( numeric-expression , decimalPlaces)
var$ = Space ( length )
var$ = String ( length , charCode )
var = InStr ( searchString$, stringToSearch$, startpos , caseFlag )
var = Len ( text$ )
var = Val ( text$ )
var$ = Hex ( numeric-expression )
var$ = StrRes( ResID )
var = StrResLen( ResID )
var = Asc( text$ )
This function returns a numeric value that is the ASCII code for the first character in the text$ string.
text$ - This can be any valid string argument.
var$ = Chr( numeric-expression )
This function returns the a string containing an ASCII character represented by the numeric expression .
numeric-expression - This argument can be any valid numeric expression that ranges from 0 to 255.
var$ = Left( text$, numOfChars )
This function returns a string that has been contains a specified number of characters( numOfChars) from the left side of the text$ string.
text$ - This can be any valid string argument.
numOfChars - This is a numeric value that designates the number of characters return.
var$ = Right( text$, numOfChars )
This function returns a string that has been contains a specified number of characters( numOfChars) from the right side of the text$ string.
text$ - This can be any valid string argument.
numOfChars - This is a numeric value that designates the number of characters return.
var$ = Mid( text$, startPos, numOfChars )
This function returns a string that has been contains a specified number of characters( numOfChars) from the middle of the text$ string at the designated character starting position (startPos).
text$ - This can be any valid string argument.
startPos - This is a numeric value that designates the starting character position
numOfChars - This is a numeric value that designates the number of characters return.
var$ = Lcase( text$ )
This function returns a string that has been converted all to lowercase. The Lcase function returns the text$ with all alphabetical letters (A-Z) converted to lowercase.
text$ - This can be any valid string argument.
var$ = Ucase( text$ )
This function returns a string that has been converted all to uppercase. The Ucase function returns the text$ with all alphabetical letters (a-z) converted to uppercase.
text$ - This can be any valid string argument.
var$ = Trim( text$ )
This function returns a string that has all leading and trailing spaces removed. The Trim function returns the text$ with all leading and trailing spaces removed. Only the space character is affected.
text$ - This can be any valid string argument.
var$ = Ltrim( text$ )
This function returns a string that has all leading spaces removed. Only the space character is affected.
text$ - This can be any valid string argument.
var$ = Rtrim( text$ )
This function returns a string that has all trailing spaces removed. Only the space character is affected.
text$ - This can be any valid string argument.
var$ = Str( numeric-expression )
This function returns a string representation of a number.
numeric-expression - This argument can be any valid numeric expression.
var$ = Str( numeric-expression, decimalPlaces )
This new variation of the STR function returns a string representation of a number with a designated number of decimal places.
numeric-expression - This argument can be any valid numeric expression.
decimalPlaces - This should be a value from 0 to 13 to designate the number of decimal places.
var$ = Space( length )
This function returns a string that contains a designated number of spaces. The Space function returns a string contain the number of spaces designated by the length parameter.
length - This argument can be any valid numeric expression.
var$ = String( length , charCode )
This function returns a string that is the length specified and filled with the ASCII character represented by charCode.
length - This argument can be any valid numeric expression.
charCode - This argument is a ASCII character code # for filling the string (ie 32 for space character).
var = InStr( searchString$, stringToSearch, startPos, caseFlag )
This function returns a numeric value indicating the string position that the searchString is at in the stringToSearch.
text$ - This can be any valid string argument.
startPos - This is a numeric value that designates the starting character position. It should be 1 or greater.
caseFlag - This is a numeric value that indicates if the search is case sensitive or not. A 0 (zero) means the search will NOT be case sensitive. Any other value will cause the search to be case sensitive.
var = Len( text$ )
This function returns the length of a string. The Len function returns a value representing the total length of text$.
text$ - This can be any valid string argument.
var = Val( text$ )
This function returns the numeric value of a string. The Val function returns the numeric value represented in the text$ string. If text$ begins with all trailing spaces removed. Only the space character is affected
text$ - This can be any valid string argument.
var$ = Hex( numeric-expression )
This function returns a string that contains the hexidecimal equivalent of the base 10 numeric-expression.
numeric-expression - This argument can be any valid numeric expression.
var$ = StrRes( ResID )
This function returns the string from a STR resource.
ResID - This is a numeric value or argument that indicates which string resource to use.
var = StrResLen( ResID )
This function returns the length of the string from a STR string resource.
ResID - This is a numeric value or argument that indicates which string resource to use.