TRIM$ function

Purpose: TRIM$ removes the following characters from the leading and trailing parts of a string.


 Syntax:

 RetStr$ = TRIM$(MainStr$)

 Parameters:

  • MainStr$ String from which leading and trailing
    • ASCII 0 nul
    • ASCII 9 tab
    • ASCII 10 carriage return
    • ASCII 11 vertical tab
    • ASCII 13 newline
    • ASCII 32 space
    are to be removed.

 Return Value:

  • RetStr$, the return value, is a trimmed substring of MainStr$.

Example:


 DIM RetStr$
 
 RetStr$ = TRIM$("     ABCDEFG     ")
 
 PRINT RetStr$

Result:

ABCDEFG