Syntax

	$string.trimEnd()

trimEnd($string)

Description

Removes all white space (spaces, tabs, line breaks, and other Unicode white space characters) at the end of the string string. White space inside the string is kept.

If string is null, the result is null. Other values are converted to a string first.

Parameters

Name Type Description Mandatory Default
string String String from which the white space is to be removed. yes

Return value

Type: String

string without trailing white space, or null if string is null.

Examples

	trimEnd("  Hello  world!  ")

Output: " Hello world!"