
Remarks
"A$" is a string variable to be assigned to the result.
"N%" and "M%" are numeric expressions in the range of 0 to 255.
"X$" may be a string variable, string expression, or string constant.
MID$ function returns a string of length M characters from X$ beginning with the
Nth character.
If M is omitted, or if there are fewer than M characters to the right of the Nth
character, all the characters beginning with the Nth character to the rightmost are
returned.
If M is equal to zero, or if N is greater than the length of X$, then MID$ returns a
null string.
Example
String1$ = "11025John Thomas, Accounting Manager"
String2$ = ","
EmployeeName$ = MID$(String1$, 6, INSTR(String1$, String2$) - 6)
' the employee's name starts at the sixth character
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.
"N%" is a numeric expression in the range of 0 to 255.
"X$" may be a string variable, string expression, or string constant.
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.
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.
Kommentare zu diesen Handbüchern