protected static function safeStrlen($string)
    {
        // Optimization -- only search once:
        static $exists = null;
        if ($exists === null) $exists = \function_exists('mb_strlen');
        if ($exists) return \mb_strlen($string, '8bit');
        return \strlen($string);
    }