RtrimS allocates and returns a copy of the string pointed to by s with any trailing blanks (space characters) removed. If the original string contains no non-blanks, the null string is returned. This function implements the BASIC RTRIM$ function.
from The Basmark QuickBASIC Programmer’s Manual by Lawrence Leinweber