From QB64 Wiki
Revision as of 02:30, 1 March 2010 by imported>Clippy (example)
Jump to navigation Jump to search

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


result = RTRIM$( value$ )


  • value$ is the STRING value to trim.
  • If value$ contains no trailing space characters, value$ is returned unchanged.
  • Cannot alter fixed length STRING variables. Convert using a non-fixed variable.


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

Keyword Reference - Alphabetical
Keyword Reference - By Usage
Main Wiki Page