array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'function.mb-ltrim.php', 1 => 'mb_ltrim', 2 => 'Strip whitespace (or other characters) from the beginning of a string', ), 'up' => array ( 0 => 'ref.mbstring.php', 1 => '多字节字符串 函数', ), 'prev' => array ( 0 => 'function.mb-list-encodings.php', 1 => 'mb_list_encodings', ), 'next' => array ( 0 => 'function.mb-ord.php', 1 => 'mb_ord', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/mbstring/functions/mb-ltrim.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>
(PHP 8 >= 8.4.0)
mb_ltrim — Strip whitespace (or other characters) from the beginning of a string
Performs a multi-byte safe ltrim() operation. Strip whitespace (or other characters) from the beginning of a string.
Without the second parameter, mb_ltrim() will strip these characters:
" "
(Unicode U+0020),普通空格。
"\t"
(Unicode U+0009),制表符。
"\n"
(Unicode U+000A),新行(换行)。
"\r"
(Unicode U+000D),回车。
"\0"
(Unicode U+0000),NUL 字节。
"\v"
(Unicode U+000B),垂直制表符。
"\f"
(Unicode U+000C),换页符。
"\u00A0"
(Unicode U+00A0),NO-BREAK SPACE。
"\u1680"
(Unicode U+1680),OGHAM SPACE MARK。
"\u2000"
(Unicode U+2000),EN QUAD。
"\u2001"
(Unicode U+2001),EM QUAD。
"\u2002"
(Unicode U+2002),EN SPACE。
"\u2003"
(Unicode U+2003),EM SPACE。
"\u2004"
(Unicode U+2004),THREE-PER-EM SPACE。
"\u2005"
(Unicode U+2005),FOUR-PER-EM SPACE。
"\u2006"
(Unicode U+2006),SIX-PER-EM SPACE。
"\u2007"
(Unicode U+2007),FIGURE SPACE。
"\u2008"
(Unicode U+2008),PUNCTUATION SPACE。
"\u2009"
(Unicode U+2009),THIN SPACE。
"\u200A"
(Unicode U+200A),HAIR SPACE。
"\u2028"
(Unicode U+2028),LINE SEPARATOR。
"\u2029"
(Unicode U+2029),PARAGRAPH SEPARATOR。
"\u202F"
(Unicode U+202F),NARROW NO-BREAK SPACE。
"\u205F"
(Unicode U+205F),MEDIUM MATHEMATICAL SPACE。
"\u3000"
(Unicode U+3000),IDEOGRAPHIC SPACE。
"\u0085"
(Unicode U+0085),NEXT LINE (NEL)。
"\u180E"
(Unicode U+180E),MONGOLIAN VOWEL SEPARATOR。
string
characters
characters
参数指定要删除的字符。只需列出所有需要删除的字符即可。
encoding
encoding
参数为字符编码。如果省略或是 null
,则使用内部字符编码。
This function returns a string with whitespace stripped from the
beginning of string
.