RIGHT$

This command will return the rightmost set of characters.

  Syntax
Return String=RIGHT$(String,Value)
  Parameters
String
String
The string to use
Value
Integer
The value specifies the number of characters to extract from the string provided

  Returns

The value returned is the rightmost characters of the specified string

  Description

The value specifies the number of characters to extract from the string provided. If the value is greater than the number of characters in the string then the entire string is return. If the value is negative or zero then an empty string is returned. The value provided should ideally be a positive integer value.

  Example Code
PRINT "hello world  left:";LEFT$("hello world",5);"  mid:";MID$("hello world",5);"  right:";RIGHT$("hello world",5)
WAIT KEY
  See also

TEXT Commands Menu
Index