Difference between revisions of "RTRIM$"

From QB64 Wiki
Jump to navigation Jump to search
imported>Stylin
(updated to new blueprint, added descriptions and example)
imported>Clippy
m
Line 12: Line 12:
  
 
{{PageExamples}}
 
{{PageExamples}}
 +
Trimming a fixed length string value for use by another string variable:
 +
{{CodeStart}}
 +
name$ = {{Cl|RTRIM$}}(contact.name) ' trims spaces from end of fixed length {{Cl|TYPE}} value.
 +
{{CodeEnd}}
 +
 +
Trimming text string ends:
 
{{CodeStart}}{{Cl|PRINT}} {{Cl|RTRIM$}}("some text") + "."
 
{{CodeStart}}{{Cl|PRINT}} {{Cl|RTRIM$}}("some text") + "."
 
{{Cl|PRINT}} {{Cl|RTRIM$}}("some text  ") + "."
 
{{Cl|PRINT}} {{Cl|RTRIM$}}("some text  ") + "."

Revision as of 02:28, 1 March 2010

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


Syntax

result = RTRIM$( value$ )


Description

  • value$ is the STRING value to trim.
  • If value$ contains no trailing space characters, value$ is returned unchanged.


Examples

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



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