UTF8
Table of Contents
Functions
- html_numeric_entity_decode() : string
- Convert numeric HTML entities to their corresponding characters
- mb_ucfirst() : string
- A unicode aware replacement for ucfirst()
- mb_explode() : array<string|int, mixed>
- Simulate explode() for multibytes strings (as documented for PHP 7.0)
- mb_strrev() : string
- Simulate strrev() for multibytes strings
- mb_substr_replace() : string
- Simulate substr_replace() for multibytes strings
- mb_trim() : string
- Multi-byte safely strip white-spaces (or other characters) from the beginning and end of a string.
- mb_ltrim() : string
- Multi-byte safely strip white-spaces (or other characters) from the beginning of a string.
- mb_rtrim() : string
- Multi-byte safely strip white-spaces (or other characters) from the end of a string.
Functions
html_numeric_entity_decode()
Convert numeric HTML entities to their corresponding characters
html_numeric_entity_decode(string $str) : string
Act like html_entity_decode() builtin but converts also control characters.
Parameters
- $str : string
Tags
Return values
stringmb_ucfirst()
A unicode aware replacement for ucfirst()
mb_ucfirst(string $str[, string|null $encoding = NULL ]) : string
TODO(LkpPo): remove this polyfill when PHP 8.4 will be the minimum PHP version
Parameters
- $str : string
- $encoding : string|null = NULL
-
Encoding ID Default is NULL
Tags
Return values
stringmb_explode()
Simulate explode() for multibytes strings (as documented for PHP 7.0)
mb_explode(string $delimiter, string $string[, int|null $limit = PHP_INT_MAX ]) : array<string|int, mixed>
Parameters
- $delimiter : string
- $string : string
- $limit : int|null = PHP_INT_MAX
-
Default is PHP_INT_MAX.
Return values
array<string|int, mixed>mb_strrev()
Simulate strrev() for multibytes strings
mb_strrev(string $str) : string
Parameters
- $str : string
Return values
stringmb_substr_replace()
Simulate substr_replace() for multibytes strings
mb_substr_replace(string $string, string $replacement, int $start[, int|null $length = NULL ][, string|null $encoding = NULL ]) : string
Parameters
- $string : string
- $replacement : string
- $start : int
-
Start position in characters
- $length : int|null = NULL
-
Default is NULL
- $encoding : string|null = NULL
-
Encoding ID Default is NULL
Return values
stringmb_trim()
Multi-byte safely strip white-spaces (or other characters) from the beginning and end of a string.
mb_trim(string $string[, string $characters = "
" ][, string|null $encoding = NULL ]) : string
Parameters
- $string : string
-
The string that will be trimmed.
- $characters : string = " "
-
Optionally, the stripped characters can also be specified using the $characters parameter. Simply list all characters that you want to be stripped.
- $encoding : string|null = NULL
-
The encoding parameter is the character encoding Default is NULL
Tags
Return values
string —The trimmed string
mb_ltrim()
Multi-byte safely strip white-spaces (or other characters) from the beginning of a string.
mb_ltrim(string $string[, string $characters = "
" ][, string|null $encoding = NULL ]) : string
Parameters
- $string : string
-
The string that will be trimmed.
- $characters : string = " "
-
Optionally, the stripped characters can also be specified using the $characters parameter. Simply list all characters that you want to be stripped.
- $encoding : string|null = NULL
-
The encoding parameter is the character encoding Default is NULL
Tags
Return values
string —The trimmed string
mb_rtrim()
Multi-byte safely strip white-spaces (or other characters) from the end of a string.
mb_rtrim(string $string[, string $characters = "
" ][, string|null $encoding = NULL ]) : string
Parameters
- $string : string
-
The string that will be trimmed.
- $characters : string = " "
-
Optionally, the stripped characters can also be specified using the $characters parameter. Simply list all characters that you want to be stripped.
- $encoding : string|null = NULL
-
The encoding parameter is the character encoding Default is NULL
Tags
Return values
string —The trimmed string