Right Procedure

Returns the lChars rightmost characters of the string sStr.

Syntax

[ s = ] Right ( sStr, lChars )

The Right procedure syntax has the following parts:

Name

Type

Description

s

BString

The result string

sStr

Val BString

Input string

lChars

Val Long

Number of characters

Comments:

If lChars is greater than the length (not dim) of sStr, the returned string s will have the same length as sStr. If lChars is 0 or less than 0, an empty string is returned.

Example

Print Right("ATEasy", 2) ! This will print "sy"

See Also

Left, Len, LTrim, Mid, RTrim