PHP: Hypertext Preprocessor (original) (raw)

mb_ltrim

(PHP 8 >= 8.4.0)

mb_ltrim — Strip whitespace (or other characters) from the beginning of a string

Description

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:

Parameters

string

The input string.

characters

Optionally, the stripped characters can also be specified using the characters parameter. Simply list all characters that need to be stripped.

encoding

The encodingparameter is the character encoding. If it is omitted or [null](reserved.constants.php#constant.null), the internal character encoding value will be used.

Return Values

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

See Also

Found A Problem?

There are no user contributed notes for this page.