← All docs

mb_rtrim()

Removes Unicode whitespace or the specified characters from the end.

mb_rtrim()

function mb_rtrim(string $string, ?string $characters = null, ?string $encoding = null): string

Removes Unicode whitespace or the specified characters from the end.

Parameters:

  • $string (string)
  • $characters (?string), default null, optional
  • $encoding (?string), default null, optional

Returns: string

Availability

No examples yet. Check examples/ and showcases/ for usage patterns.

Internals

For how mb_rtrim is implemented in the compiler, see the internals page.