# RTRIM

Removes trailing whitespaces from a string.

## Syntax

`RTRIM(string)`

### Parameters

#### string

String expression to process. If the value is `null`, the function returns `null`.

## Examples

Removes trailing spaces from the `message` and `color` columns, then adds single quotes around the trimmed results.

```esql
ROW message = "   some text  ",  color = " red "
| EVAL message = RTRIM(message)
| EVAL color = RTRIM(color)
| EVAL message = CONCAT("'", message, "'")
| EVAL color = CONCAT("'", color, "'")
```
