MediaWiki
1.23.3
|
Fallback functions for PHP installed without mbstring support. More...
Static Public Member Functions | |
static | iconv ( $from, $to, $string) |
static | mb_strlen ( $str, $enc='') |
Fallback implementation of mb_strlen, hardcoded to UTF-8. More... | |
static | mb_strpos ( $haystack, $needle, $offset=0, $encoding='') |
Fallback implementation of mb_strpos, hardcoded to UTF-8. More... | |
static | mb_strrpos ( $haystack, $needle, $offset=0, $encoding='') |
Fallback implementation of mb_strrpos, hardcoded to UTF-8. More... | |
static | mb_substr ( $str, $start, $count='end') |
Fallback implementation for mb_substr, hardcoded to UTF-8. More... | |
static | mb_substr_split_unicode ( $str, $splitPos) |
Fallback functions for PHP installed without mbstring support.
Definition at line 26 of file Fallback.php.
|
static |
$from | |
$to | |
$string |
Definition at line 34 of file Fallback.php.
References $from.
|
static |
Fallback implementation of mb_strlen, hardcoded to UTF-8.
string | $str | |
string | $enc | optional encoding; ignored |
Definition at line 136 of file Fallback.php.
References $total.
Referenced by mb_substr_split_unicode(), and FallbackTest\testFallbackMbstringFunctions().
|
static |
Fallback implementation of mb_strpos, hardcoded to UTF-8.
$haystack | String | |
$needle | String | |
string | $offset | optional start position |
string | $encoding | optional encoding; ignored |
Definition at line 160 of file Fallback.php.
References array().
|
static |
Fallback implementation of mb_strrpos, hardcoded to UTF-8.
$haystack | String | |
$needle | String | |
string | $offset | optional start position |
string | $encoding | optional encoding; ignored |
Definition at line 181 of file Fallback.php.
References array().
|
static |
Fallback implementation for mb_substr, hardcoded to UTF-8.
Attempts to be at least moderately efficient; best optimized for relatively small offset and count values – about 5x slower than native mb_string in my testing.
Larger offsets are still fairly efficient for Latin text, but can be up to 100x slower than native if the text is heavily multibyte and we have to slog through a few hundred kb.
$str | |
$start | |
$count | string |
Definition at line 66 of file Fallback.php.
References $count, and mb_substr_split_unicode().
|
static |
$str | |
$splitPos |
Definition at line 85 of file Fallback.php.
References mb_strlen().
Referenced by mb_substr().