QB64.com

QB64 is a modern extended BASIC programming language that retains QBasic/QuickBASIC 4.5 compatibility and compiles native binaries for Windows, Linux, and macOS.

The RTRIM$ function removes trailing space characters from a STRING value.

Syntax

return$ = RTRIM$(value$)

Description

Example(s)

Trimming a fixed length string value for use by another string variable:


name$ = RTRIM$(contact.name) ' trims spaces from end of fixed length TYPE value.

Trimming text string ends:


PRINT RTRIM$("some text") + "."
PRINT RTRIM$("some text   ") + "."
PRINT RTRIM$("Tommy    ")


some text.
some text.
Tommy

See Also