_mb_strlen(string$str, string|null$encoding = null ): int
Since
4.2.0
Source
wp-includes/compat.php:225
Internal compat function to mimic mb_strlen().
Description
Only supports UTF-8 and non-shifting single-byte encodings. For all other encodings expect the counts to be wrong. When the given encoding (or the blog_charset if none is provided) isn’t UTF-8 then the function returns the byte-count of the provided string.
Parameters
$strstring
The string to retrieve the character length from.
$encodingstring|nulloptional
Count characters according to this encoding. Default is to consult blog_charset.Default: null
Return
int
Count of code points if UTF-8, byte length otherwise.
Uses · 3
_is_utf8_charset()Indicates if a given slug for a character set represents the UTF-8 text encoding.
get_option()Retrieves an option value based on an option name.
Signature, return type and hooks compared across 5 parsed releases.
About this page
Parsed data
Generated from the wordpress-develop 7.0.4 tag, from src/wp-includes/compat.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.