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); ?>

mb_ltrim

(PHP 8 >= 8.4.0)

mb_ltrimStrip whitespace (or other characters) from the beginning of a string

说明

mb_ltrim(string $string, ?string $characters = null, ?string $encoding = null): 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:

参数

string
The input string.
characters
可选,也可以使用 characters 参数指定要删除的字符。只需列出所有需要删除的字符即可。
encoding

encoding 参数为字符编码。如果省略或是 null,则使用内部字符编码。

返回值

This function returns a string with whitespace stripped from the beginning of string.

参见