Skip to main content

Right

Right (Function)

Format

right( string_expression, length_expression)

returns string_expression

Description

If length is greater than or equal to zero, returns a portion of the specified string_expression, starting from the first character on the right and continuing for length_expression characters. If length is less than zero then remove length_expression characters from the right of the string.

Example

print right("Hello", 2)
print right("Hello", -2)

will display

lo
Hel

See Also

Asc, Chr, Count, Countx, Explode, Explodex, Implode, Instr, Instrx, Left, Length, Ljust, Lower, LTrim, MD5, Mid, Midx, Replace, Replacex, Right, Rjust, RTrim, Serialize, String, Trim, Unserialize, Upper, Zfill

History

0.9.5bNew To Version
1.99.99.53Added length < 0