def
func:trim
trim(val)
Trim whitespace from the beginning and end of the string. For the purposes of this function, whitespace is defined as any character equal to or less than the 0x20 space character (including
, \r
, \n
, and \t
).
Examples:
" abc ".trim >> "abc" "abc".trim >> "abc"