rtrim(string [,string])
Remove all whitespace characters from the end of the string. Whitespace is defined as the space, tab, newline, formfeed, and vertical tab. A list of characters can be specified using the second argument to make rtrim remove all characters in that string rather than the default whitespace characters.
Examples
str = rtrim( "test ")
str = rtrim( "test#######", "#")
str = rtrim( str, chr(9,10,13,32))