mb_ltrim
Description
The mb_ltrim of Multibyte String for PHP strips whitespace (or other characters) from the beginning of a string.
Syntax
mb_ltrim( string $string, ?string $characters = null, ?string $encoding = null ): string
Parameters
string
The input string.
characters
The list of all the characters that need to be stripped.
encoding
The character encoding.
If omitted or null, the internal character encoding value will be used.
Return
Returns a string with whitespace stripped from the beginning of the string.
Examples
1 · string
<? $string = "\0\t\n\v\r \x00\x09\x0A\x0B\x0D\x20🐘string"; $return = mb_ltrim($string); var_dump($string, $return);
string(22) "