This function removes whitespace from the end of a string and should in most cases be used instead of the native T-SQL function RTRIM that only trims the space character.
List of characters considered whitespace:
Horizontal tab
New line
Vertical tab
Form feed
Carriage return
Space
The trimmed string.