trim_right

This function can be used to remove all white-space characters from the end of a string. Whitespace characters include spaces, tabs, new-line characters etc.

This function does not generate a change.

Function

str.trim_right()

Arguments

None

Return value

Returns a new string with whitespace characters removed from the end of the string.

See also

Example

Example using trim_right():

'  Hello World!!  '.trim_right();

Return value in JSON format

"  Hello World!!"