Habari\MultiByte::strlen PHP Method

strlen() public static method

Gets the length of a string in characters
public static strlen ( $str, $use_enc = null ) : integer.
$str string. The string who's length is being returned.
$use_enc string. The encoding to be used. If not set, the internal encoding will be used.
return integer.
    public static function strlen($str, $use_enc = null)
    {
        $enc = self::$hab_enc;
        if ($use_enc !== null) {
            $enc = $use_enc;
        }
        if (self::$use_library == self::USE_MBSTRING) {
            $len = mb_strlen($str, $enc);
        } else {
            $len = strlen($str);
        }
        return $len;
    }