Share via


String.trimEnd Function

Removes trailing white-space characters from a String object.

var trimmedStringVar = myString.trimEnd();

Return Value

A copy of the string with all white-space characters removed from the end of the string.

Remarks

Use the trimEnd function to remove trailing white-space characters from the String object. Examples of white-space characters are spaces and tabs.

Example

The following code example demonstrates how to use the trimEnd function to remove trailing white space from a String object.

See Also

Reference

String.trimStart Function

Other Resources

Language Reference