Introduction | Language Structure | IB Statements | File System | Comet 32 Runtime | Index |
| Syntax: | STRIP(string-argument) |
| Discussion: |
The STRIP function strips leading and trailing blanks from a
string expression. The resulting current length of the string is
adjusted accordingly.
The string-argument may be a string constant, a single-element string variable, a string array element, a string expression, or a string function. |
| Example 1: |
A$=STRIP(B$)In the above example, the data contained in string variable B$ is stripped of leading and trailing blanks. The result is moved to the string variable A$. |
| Example 2: |
INPUT OPTION$ IF STRIP(OPTION$) = "Y" THEN GOTO SectionTwoIn this example, the variable OPTION$ is used to receive input from the video screen. Next, leading and trailing blanks are stripped from the variable and the result is compared to "Y". If the result equals "Y" the program branches to statement label SectionTwo. |