RTRIM$

From QB64 Phoenix Edition Wiki
Revision as of 15:31, 19 April 2022 by BigRon55 (talk | contribs) (Created page with "The {{KW|RTRIM$}} function removes trailing space characters from a {{KW|STRING}} value. {{PageSyntax}} :{{parameter|return$}} = {{KW|RTRIM$}}({{Parameter|value$}}) {{PageDescription}} * {{Parameter|value$}} is the {{KW|STRING}} value to trim. * If {{Parameter|value$}} contains no trailing space characters, {{Parameter|value$}} is returned unchanged. * Convert fixed length {{KW|STRING}} values by using a different {{parameter|return$}} variable. {{PageExamples}} T...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The Template:KW function removes trailing space characters from a Template:KW value.


Syntax

return$ = Template:KW(value$)


Description

  • value$ is the Template:KW value to trim.
  • If value$ contains no trailing space characters, value$ is returned unchanged.
  • Convert fixed length Template:KW values by using a different return$ variable.


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:
Main Page with Articles and Tutorials
Keyword Reference - Alphabetical
Keyword Reference - By usage
Report a broken link