
Example
S1$ = TRIM_LEFT$(" Hello World!")
' S1$ = "Hello World!"
TRIM_RIGHT$
Purpose
To return a copy of a string with trailing blank spaces stripped away.
Syntax
A$ = TRIM_RIGHT$(X$)
Remarks
"A$" is a string variable to be assigned to the result.
"X$" is a string variable that may contain some space characters at the end.
Example
S2$ = TRIM_RIGHT$("Hello World! ")
' S2$ = "Hello World!"
5.4.6 Converting for Strings
Several commands are available for converting strings to uppercase or lowercase letters, as
well as converting strings to numbers, and vice versa.
ASC
Purpose
To return the decimal value for the ASCII code for the first character of a given
string.
Syntax
A% = ASC(X$)
Remarks
"A%" is an integer variable to be assigned to the result.
"X$" is a string variable, consisting of characters.
Example
A% = ASC("John Thomas") ' A% = 74
CHR$
Purpose
To return the character for a given ASCII value.
Syntax
A% = CHR$(N%)
Remarks
"A$" is a string variable to be assigned to the result.
"N%" is a numeric expression in the range of 0 to 255.
Comentarios a estos manuales