UTF::trim PHP Method

trim() public method

Strip whitespaces from the beginning and end of a string
public trim ( $str ) : string
$str string
return string
    function trim($str)
    {
        return preg_replace('/^[\\pZ\\pC]+|[\\pZ\\pC]+$/u', '', $str);
    }