public static function substr($str, $offset, $length = false)
    {
        if ($length === false) {
            return mb_substr($str, $offset);
        } else {
            return mb_substr($str, $offset, $length);
        }
    }
public static function substr($str, $offset, $length = false)
    {
        if ($length === false) {
            return mb_substr($str, $offset);
        } else {
            return mb_substr($str, $offset, $length);
        }
    }
public static function substr ( $ str , $ offset , $ length = false ) { if ( $ length === false ) { return mb_substr ( $ str , $ offset ) ; } else { return mb_substr ( $ str , $ offset , $ length ) ; } }
UTF-8 aware alternative to substr

Return part of a string given character offset (and optionally length)

@param string
@param integer number of UTF-8 characters offset (from left)
@param integer (optional) length in UTF-8 characters from offset
@return mixed string or FALSE if failure
@see http://www.php.net/substr
UTF - 8 aware alternative to substr