Remove whitespace, or other specified character, from a string


Trim from both sides of a string

trim(string [,charlist]) ; //optional charlist


Trim from left side of a string

ltrim(string [,charlist]) ; //optional charlist


Trim from right side of a string

rtrim(string [,charlist]) ; //optional charlist


If charlist is not used, the following will be removed:

" " Empty space
"\t" Tab
"\n" New Line
"r" Carriage Return
"\0" NULL
"\x0B" Vertical Tab

Leave a Reply