Strip whitespace from a string/Top and tail: Difference between revisions

Strip 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}}==
2,140

edits