Rtrim() |
Working with Formulas > Functions Used in Formulas > Text Functions > Rtrim()
RTRIM() removes each character in the list from the right side of the string. When a rightmost character in the string matches a character in the list, the character in the string is removed. The process then repeats itself with all characters in the list, regardless of order, until no further rightmost characters in the string are present in the list. If the list is blank, RTRIM() removes spaces from the right side of the string. See examples below for further clarification.
RTRIM() is similar to TRIM(), which removes characters from the left and right sides of a string, and to LTRIM(), which removes characters from the left side of a string.
Function Format
RTRIM(string [, list])
Return Value
RTRIM() returns a character string
Examples
RTRIM(" APPLES ") = " APPLES"
RTRIM("APPLES", "S") = "APPLE"
RTRIM("APPLES", "SE") = "APPL"
RTRIM("APPLES", "E") = "APPLES"
RTRIM ("APPLES", "ES") = "APPL"
RTRIM("APPLES", "ELP") = "APPLES"
RTRIM("APPLES", "ELPS") = "A"
RTRIM("ABRACADABRA", "ARBD") = "ABRAC"
RTRIM("ABRACADABRA", "ARBDC") = "" |