CipherLab BASIC Programming
RIGHT$
Purpose
To retrieve a given number of characters from the right side of the target
string.
Syntax
A$ = RIGHT$(X$, N%)
Remarks
"A$" is a string variable to be assigned to the result.
"X$" may be a string variable, string expression, or string constant.
"N%" is a numeric expression in the range of 0 to 255.
Example
String1$ = "11025John Thomas, Accounting Manager"
String2$ = ","
Title$ = RIGHT$(String1$, LEN(String1$) – INSTR(String1$, String2$))
TRIM_LEFT$
Purpose
To return a copy of a string with leading blank spaces stripped away.
Syntax
A$ = TRIM_LEFT$(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
beginning.
Example
S1$ = TRIM_LEFT$(" 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! ")
42
Part I
If N is larger than the length of X$, the entire string is returned.
If N is zero, the null string (with length 0) is returned.
' S1$ = "Hello World!"
' S2$ = "Hello World!"
Need help?
Do you have a question about the 8 Series and is the answer not in the manual?