Function RTrim() Foundation
Deletes blank spaces at the end of a character string.
RTrim( <cString> ) --> cTrimString Trim( <cString> ) --> cTrimString
RTrim() returns a copy of <cString> with all blank spaces (Chr(32) only) at the end deleted. The function can be abbreviated as Trim(). When <cString> is an empty character string or only contains blank spaces, the return value is a null string ("").
The character function RTrim() is used to format character strings whose last characters consist of blank spaces (Chr(32)). The functions RTrim() and Trim() are equivalent and provide identical results. RTrim() is often used when the contents of a database field are assigned to a memory variable and the variable needs to contain a character string without blank spaces at the end.
RTrim() resembles the function LTrim() which deletes blank spaces at the beginning of a character string. The function Alltrim() also deletes blank spaces and removes all blank spaces at the beginning and end of a character string. The counterparts of the functions LTrim(), RTrim() and Alltrim() are the functions PadL(), PadR() and PadC() which insert blank spaces at the beginning, end or both sides of a character string.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.