trimEnd

Modified on Wed, 02 Aug 2023

Description

Remove trailing whitespace or specified characters from string

Syntax

trimEnd(text, characters)

Parameters

Input ParameterTypeDescription
textstringThe string to trim.
characters (optional)stringThe characters to trim.

Return value

Type
string

Sample

ExampleResultDescription
trimEnd(' abc ')' abc'Reomve spaces from end of the string
trimEnd('123abc321', '123')'123abc'Reomve all the mached characters from end of the string
trimEnd('123abc321', '12')'123abc3'Reomve all the mached characters from end of the string

To view all the String functions, click here.

See Also