Right function (LotusScript® Language)

Extracts a specified number of the rightmost characters in a string.

Syntax

Right[$] ( expr , n )

Elements

expr

Any numeric or String expression for Right; and any Variant or String expression for Right$. If the expression is numeric, it is first converted to a string.

n

The number of characters to be returned.

Return value

Right returns a Variant of DataType 8 (String), and Right$ returns a String.

If n is 0, Right returns the empty string (""); if n is greater than the number of characters in expr, Right returns the entire string.

Right(NULL,1) returns NULL. Right$(NULL,1) returns an error.

Usage

LotusScript® Release 3 and later represent characters with two bytes instead of one, so IBM® no longer recommends using the RightB function to work with bytes.

Example