_mb_strlen


_mb_strlen ( $str, $encoding = null )

Parameters:
  • (string) $str The string to retrieve the character length from.
  • (string|null) $encoding Optional. Character encoding to use. Default null.
Returns:
  • (int) String length of `$str`.
Defined at:

Description

Internal compat function to mimic mb_strlen().

Only understands UTF-8 and 8bit. All other character sets will be treated as 8bit. For $encoding === UTF-8, the $str input is expected to be a valid UTF-8 byte sequence. The behavior of this function for invalid inputs is undefined.

Related Functions

mb_strlen, _mb_substr, print_embed_styles, startelement, randomcompat_strlen

Top Google Results

User discussions

wpseek mobile