Explanation
LTRIM$, RTRIM$ Functions
Remove leading and trailing spaces from a string.Worth knowing
Useful and cross-version information about the programming environments of QBasic, QuickBasic and Visual Basic for DOS.
Useful and cross-version information about the programming environments of QBasic, QuickBasic and Visual Basic for DOS.
LTRIM$(stringexpression$) |
RTRIM$(stringexpression$) |
stringexpression$ | Any string expression. |
a$ = " Basic "
PRINT "*" + a$ + "*" 'Output is: * Basic *
PRINT "*" + LTRIM$(a$) + "*" 'Output is: *Basic *
PRINT "*" + RTRIM$(a$) + "*" 'Output is: * Basic*