Up |
strtrim Scol 5.2 or above required
Remove space (' '), tabulation ('\t') and return ('\n') characters in a string (at the start, at the end).
Prototype :
fun [S] S
- S : a string
Return : S a new string or nil if error
See also :
Example :
// sprintf is in the Syspack API
fun main ()=
_showconsole;
let " Bob and Alice " -> s in
(
_fooS sprintf "__%s__" [s]; // __ Bob and Alice __
set s = strtrim s;
_fooS sprintf "__%s__" [s]; // __Bob and Alice__
);
0;;