Rtrim Function

Action

Strips trailing whitespace from a string.

Syntax

sStripped = Rtrim (sToStrip)
Variable Description
sStripped The stripped string. STRING.
sToStrip The string to strip. STRING.

Notes

Rtrim removes trailing whitespace characters from a string as determined by IsSpace from a specified string.and returns the rest of the string. If sToStrip is an empty string ("") or contains only whitespace, Rtrim returns an empty string.

If sToStrip does not end with whitespace, Rtrim returns sString unmodified.

Whitespace characters are spaces, horizontal tabs, vertical tabs, carriage returns, linefeeds, and formfeeds.

Example

STRING s = " Has whitespace "
Print( ">{RTrim(s)}<") // prints: > Has whitespace<