right
Top  Previous  Next

val = right(stringlength)
 

Returns a specified number of characters from the right side of a string.

Parameters
 
string  
 
String from which the rightmost characters are returned. If not string, converted to string.  
 
length  
 
Number of characters to return. If not integer, converted to integer.  

Remarks

If length less than 1, empty string is returned.  
If length greater than or equal to the number of characters in string, the entire string is returned.  

Example


a = right("Hello", 3)    ' Returns "llo"
   
a = right("Hello", 50)    ' Returns "Hello"
   
a = right("Hello", -50)    ' Returns ""