suve

awful: function: str-trim

Declaration

string :str-trim ( string $TEXT )

Summary

Returns a copy of the provided string with all whitespace (non-printable characters) removed from beginning and end.

Example

# :trim example.
:set &STR s'     spaaaace     '
:writeln s'X' $STR s'X'
:writeln s'X' (:str-ritrim $STR) s'X'
:writeln s'X' (:str-letrim $STR) s'X'
:writeln s'X' (:str-trim $STR) s'X'

wikipage modified on 2014/0601/2317