# RTrim - script and chart function

RTrim() returns the input string trimmed of any trailing spaces.

Syntax:

RTrim(text)

Return data type: string

Examples and results:

Examples and results

| Example | Result |
| --- | --- |
| `RTrim( ' abc' )` | Returns ' abc' |
| `RTrim( 'abc ' )` | Returns 'abc' |

## Learn more

* [LTrim - script and chart function](https://help.qlik.com/en-US/qlikview/September2025/Subsystems/Client/Content/QV_QlikView/Scripting/StringFunctions/LTrim.htm)