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
ParameterTypeRequiredDescription
stringVARCHARYesString 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 VARCHARf2 VARCHARf3 VARCHARf4 VARCHAR
hello world mixed spacesno trim needed

Last update at: 2026/03/03 16:47:38
Last updated: 2026-03-03 16:48:19