Home > Language Reference > String Management Functions > RTrim$

RTrim$

The RTrim$ function removes trailing spaces/tabulations from the specified string.

Usage

Prefer to use Trim$ function to remove leading and trailing spaces/tabulations. 

Syntax

var$=RTrim$(<source_string>)

Parameters

<source_string>, string to remove trailing spaces/tabulations from.

Return value

var$, string with the trailing spaces/tabulations removed.

See also

Asc
Chr$
Encrypt
ExtractBetween$
InStr
InStrRev
LCase$
Left$
Len
LTrim$
Mid$
Replace$
Right$
SplitIntoArray
Str$
Trim$
UCase$
Val

Examples

a$ = Rtrim$("bcde ") ' Returns "bcde" in a$

a$ = Rtrim$(a$) ' Deletes the spaces at the end of a$