Return a copy of a string with trailing (rightmost) spaces removed.
RTrim[$] removes leading and trailing spaces from a string.
RTrim returns a Variant; RTrim$ returns a String. The stringexpr argument can be any string expression. However, only RTrim can accept a Variant of Null as stringexpr, in which case, a Null is returned.
This example usesRTrim to strip trailing spaces from the variable TestString.
StripTrailSpace = RTrim(TestString) // Strip trailing spaces.