Right

From NSB App Studio
Revision as of 19:00, 8 July 2012 by Brendon (talk | contribs) (Created page with "RIGHT(''string, ''length'') '''Description''' RIGHT returns a string containing a number of characters from the right end of a string. The required parameter, string, is any...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

RIGHT(string, length)

Description

RIGHT returns a string containing a number of characters from the right end of a string. The required parameter, string, is any valid string expression. The required parameter, length, is any valid numeric expression, if length is 0, an empty string ("") is returned, if length is greater than the size of string, the entire string is returned.

Example

REM RIGHT Example
'RIGHT returnssubstringfromstringrightend
DIM Wendy, Eric
Wendy = "Testaburger"
Eric = "Cartman"
PRINT "The RIGHT 6 of " & Wendy & ":", _
  RIGHT(Wendy, 6)
PRINT "The RIGHT 4 of " & Eric & ":", _
  RIGHT(Eric, 4)

Output

The RIGHT 6 of Testaburger:burger
The RIGHT 4 of Cartman:    tman

Related Items

LEFT, MID