Strip whitespace from a string/Top and tail: Difference between revisions
Strip whitespace from a string/Top and tail (view source)
Revision as of 22:09, 10 October 2022
, 1 year agoStrip whitespace from a string/Top and tail in XBasic
(Strip whitespace from a string/Top and tail in BASIC256) |
(Strip whitespace from a string/Top and tail in XBasic) |
||
Line 3,032:
'String with leading whitespace, form feed and vertical tab characters removed'
</pre>
=={{header|XBasic}}==
{{works with|Windows XBasic}}
<syntaxhighlight lang="xbasic">PROGRAM "progname"
VERSION "0.0000"
DECLARE FUNCTION Entry ()
FUNCTION Entry ()
s$ = " \tRosetta Code \v\f\r\n"
PRINT LTRIM$(s$) ' remove leading whitespace
PRINT RTRIM$(s$) ' remove trailing whitespace
PRINT TRIM$(s$) ' remove both leading and trailing whitespace
END FUNCTION
END PROGRAM</syntaxhighlight>
=={{header|XPL0}}==
|