_mb_substr


_mb_substr ( $str, $start, $length = null, $encoding = null )

Parameters:
  • (string) $str The string to extract the substring from.
  • (int) $start Position to being extraction from in `$str`.
  • (int|null) $length Optional. Maximum number of characters to extract from `$str`. Default null.
  • (string|null) $encoding Optional. Character encoding to use. Default null.
Returns:
  • (string) Extracted substring.
Defined at:

Description

Internal compat function to mimic mb_substr().

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_strlen, randomcompat_substr, get_object_subtype, _maybe_update_core

Top Google Results

User discussions

wpseek mobile