RIGHT-TRIM function
- Last Updated: October 16, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
Removes trailing white space, or other specified characters, from a CHARACTER or LONGCHAR expression. The data type of the returned value matches the data type of the expression passed to the function.
Syntax
|
- expression
- An expression (a constant, field name, variable name, or expression) whose value is a CHARACTER or LONGCHAR. If expression is a case-sensitive variable, the AVM performs a case-sensitive trim. If expression is a LONGCHAR, the result is in the same code page.
- trim-chars
- A character expression that specifies the characters to trim from expression. If you do not specify trim-chars, the RIGHT-TRIM function removes spaces, tabs, line feeds, and carriage returns.
Example
The following example shows the effects of the TRIM, RIGHT-TRIM, and LEFT-TRIM functions:
r-ltrim.p
|
Notes
- The RIGHT-TRIM function is similar to the TRIM function except that it trims characters only from the right end of the string.
- If expression is a case-sensitive field or variable, then trim-chars is also treated as case sensitive. Otherwise, trim-chars is not case sensitive.
- The RIGHT-TRIM function is double-byte enabled. The specified expression and trim-chars arguments can contain double-byte characters. RIGHT-TRIM does not remove double-byte space characters by default.