Online trim() function

string trim ( string $str [, string $charlist] )

This function returns a string with whitespace stripped from the beginning and end of str. Without the second parameter, this tool will strip these characters:



(optional)