RTRIM
All functions > STRING > RTRIM
Returns the string with whitespace from the right (end) removed.
Signatures
Returns: String with trailing whitespace removed
RTRIM(string: VARCHAR) → VARCHAR sql
| Parameter | Type | Required | Description |
|---|---|---|---|
string | VARCHAR | Yes | String to trim |
Notes
- Removes spaces, tabs, newlines from the end only
- Leading whitespace is preserved
- Middle whitespace is preserved
Examples
FeatureQL
SELECT
f1 := RTRIM(' hello '), -- Trim right only
f2 := RTRIM(' world '), -- Trim tab from right
f3 := RTRIM(' mixed spaces '), -- Only right trim
f4 := RTRIM('no trim needed') -- No right whitespace
;Result
| f1 VARCHAR | f2 VARCHAR | f3 VARCHAR | f4 VARCHAR |
|---|---|---|---|
| hello | world | mixed spaces | no trim needed |
On this page