WPDev.one
Core Function
View Source on Trac ↗

_mb_substr()

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

Internal compat function to mimic mb_substr().

Parameters 4 required

Name / Type Description
$str
string

The string to extract the substring from.

Required
$start
int

Position to being extraction from in `$str`.

Required
mixed

(int | null) $length Optional. Maximum number of characters to extract from `$str`. Default null.

Required
(string

| null) $encoding Optional. Character encoding to use. Default null.

Required

Return Value

(string)
Extracted substring.

Function Information

Since Version
3.2.0
Source File
wp-includes/compat.php
Advertisement