public static function strspn($str, $mask, $start = null, $length = null)
    {
        if (!function_exists('utf8_strspn')) {
            require_once __DIR__ . '/phputf8/strspn.php';
        }

        if ($start === null && $length === null) {
            return utf8_strspn($str, $mask);
        }

        if ($length === null) {
            return utf8_strspn($str, $mask, $start);
        }

        return utf8_strspn($str, $mask, $start, $length);
    }