The function removes whitespace characters as spaces, tabs and newlines from
the beginning and end of the supplied string. Whitespace characters
occurring in the middle of the string are retained.
Trimming with method
"left" deletes only leading whitespaces, "right" only
trailing. Designed for users who were socialized by SQL.
Details
The functions are defined depending on method asboth: gsub( pattern=gettextf("^[\%s]+|[\%s]+$", pattern, pattern), replacement="", x=x)left: gsub( pattern=gettextf("^[\%s]+",pattern), replacement="", x=x)right: gsub( pattern=gettextf("[\%s]+$",pattern), replacement="", x=x)
See also
string-overview for an overview of all string utilities in pharos.
