forked from Galleondragon/qb64
-
Notifications
You must be signed in to change notification settings - Fork 24
RTRIM$
Cory Smith edited this page Sep 1, 2022
·
5 revisions
The RTRIM$ function removes trailing space characters from a STRING value.
return$ = RTRIM$(value$)
- value$ is the STRING value to trim.
- If value$ contains no trailing space characters, value$ is returned unchanged.
- Convert fixed length STRING values by using a different return$ 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