RIGHT$

From QB64 Wiki
Revision as of 21:20, 2 September 2009 by imported>Clippy (Created page with 'The '''RIGHT$''' string function returns a part of a string from the end. ''Syntax:'' RIGHT$(stringvalue$, characters%) * The string value can be any string of ASCII charac…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The RIGHT$ string function returns a part of a string from the end.


Syntax: RIGHT$(stringvalue$, characters%)


  • The string value can be any string of ASCII characters as a string variable.
  • The number of characters% should not exceed the length(LEN) of the string.
  • RIGHT$ return always starts at the last character of the string, even if a space.
  • It counts backwards from the end of the string value.


Example:

name$ = "Tom Williams"

Last$ = RIGHT$(name$, 8)

PRINT Last$


Screen Returns: Williams


See also: LEFT$, MID$, LTRIM$, RTRIM$,


Navigation:

Go to Keyword Reference - Alphabetical

Go to Keyword Reference - By usage