function _strlen($str) {
        static $mbstring;

        // Cache expensive function_exists() calls.
        if (!isset($mbstring)) {
            $mbstring = function_exists('mb_strwidth');
        }

        if ($mbstring) {
            return mb_strwidth($str, $this->_charset);
        }

        return strlen($str);
    }
function _strlen($str) {
        static $mbstring;

        // Cache expensive function_exists() calls.
        if (!isset($mbstring)) {
            $mbstring = function_exists('mb_strwidth');
        }

        if ($mbstring) {
            return mb_strwidth($str, $this->_charset);
        }

        return strlen($str);
    }
function _strlen ( $ str ) { static $ mbstring ; // Cache expensive function_exists() calls. if ( ! isset ( $ mbstring ) ) { $ mbstring = function_exists ( 'mb_strwidth' ) ; } if ( $ mbstring ) { return mb_strwidth ( $ str , $ this -> _charset ) ; } return strlen ( $ str ) ; }
Returns the character length of a string.

@param string $str A multibyte or singlebyte string.

@return integer  The string length.
Returns the character length of a string .