protected static function strlen($value)
{
if (!function_exists('mb_detect_encoding')) {
return strlen($value);
}
if (false === ($encoding = mb_detect_encoding($value))) {
return strlen($value);
}
return mb_strwidth($value, $encoding);
}