Summery Summery
Safe string length
Syntax Syntax
Parameters Parameters
- $str
-
(Required)
Return Return
(int)
Source Source
File: wp-includes/sodium_compat/src/Core/Util.php
public static function strlen($str)
{
/* Type checks: */
if (!is_string($str)) {
throw new TypeError('String expected');
}
return (int) (
self::isMbStringOverride()
? mb_strlen($str, '8bit')
: strlen($str)
);
}