Advantage Concepts
Advantage Expression Engine function that removes trailing spaces from a character string
RTRIM(<cString>) à cTrimString
<cString> The character string to be copied without trailing spaces.
RTRIM() returns a copy of <cString> with the trailing spaces removed. If <cString> is a null string ("") or all spaces, RTRIM() returns a null string ("").
RTRIM() is a character function that formats character strings. It is useful for deleting trailing spaces while concatenating strings. This is typically the case with database fields that are stored in fixed-width format. For example, use RTRIM() to concatenate first and last name fields to form a name string.
RTRIM() is identical to TRIM(). RTRIM() is also related to LTRIM(), which removes both leading and trailing spaces. The inverse of ALLTRIM(), LTRIM(), and RTRIM() are the PADC(), PADR(), and PADL() functions which center, right-justify, or left-justify character strings by padding them with fill characters. RTRIM() is exactly the same as TRIM() in function.
Note Do not use RTRIM, ALLTRIM, LTRIM, or TRIM to create a variable length index key. If you use a TRIM function, also use a PAD function to make the key length a fixed length. For example: PADR(RTRIM(charfield),10).
Note The RTRIM() function treats carriage returns, line feeds, and tabs as space characters and removes these as well.
Note Advantage Expression Engine functions can be used in expressions such as record filter expressions and index expressions. They are not necessarily scalars supported within SQL statements. For a list of supported SQL scalar functions, see Supported Scalar Functions.
Note Memo, binary, and image fields are not supported in this Advantage Expression Engine function. If memo, binary, or image fields are used with this expression engine function, the Advantage Expression Engine will be unable to evaluate the expression.