PHP: Hypertext Preprocessor (original) (raw)

mb_rtrim

(PHP 8 >= 8.4.0)

mb_rtrim — Strip whitespace (or other characters) from the end of a string

Description

Performs a multi-byte safe rtrim() operation, and returns a string with whitespace (or other characters) stripped from the end of string.

Without the second parameter,mb_rtrim() 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

Returns the modified string.

See Also

Found A Problem?

There are no user contributed notes for this page.