# rtrim {#rtrim}

**Parent topic:**[Functions](../../Functions/category.md)

## Syntax {#syntax}

`rtrim(X)`

## Arguments {#arguments}

**X** is a string scalar or vector.

## Details {#details}

Take a string of characters that has spaces at the end, and return the text without the spaces at the end.

## Examples {#examples}

```
rtrim("I love      ")+" "+ltrim("    this game!");
// output: I love this game!
```

