protected function _unicodeTrim($value, $charlist = '\\\\s')
    {
        $chars = preg_replace(
            array( '/[\^\-\]\\\]/S', '/\\\{4}/S', '/\//'),
            array( '\\\\\\0', '\\', '\/' ),
            $charlist
        );

        $pattern = '^[' . $chars . ']*|[' . $chars . ']*$';
        return preg_replace("/$pattern/sSD", '', $value);
    }
protected function _unicodeTrim($value, $charlist = '\\\\s')
    {
        $chars = preg_replace(
            array( '/[\^\-\]\\\]/S', '/\\\{4}/S', '/\//'),
            array( '\\\\\\0', '\\', '\/' ),
            $charlist
        );

        $pattern = '^[' . $chars . ']*|[' . $chars . ']*$';
        return preg_replace("/$pattern/sSD", '', $value);
    }
protected function _unicodeTrim ( $ value , $ charlist = '\\\\s' ) { $ chars = preg_replace ( array ( '/[\^\-\]\\\]/S' , '/\\\{4}/S' , '/\//' ) , array ( '\\\\\\0' , '\\' , '\/' ) , $ charlist ) ; $ pattern = '^[' . $ chars . ']*|[' . $ chars . ']*$' ; return preg_replace ( "/$pattern/sSD" , '' , $ value ) ; }
Unicode aware trim method
Fixes a PHP problem

@param string $value
@param string $charlist
@return string
Unicode aware trim method Fixes a PHP problem