Right

Mon 01 January 2018

Syntax

Right(str [, num_chars])

Description

Use the Right function to return a specified number of characters from the right side of a string. The function is useful if, for example, you want to get the last set of characters in a zip code or other fixed-length identification string. If the string contains Unicode non-BMP characters, each code unit of the surrogate pair is counted as a separate character and care should be taken not to split the surrogate pair.

Parameters

Field or Control

Definition

str

A String value from which you want to get the rightmost characters.

num_chars

A Number value, greater than or equal to zero. If num_chars is omitted it is assumed to be equal to 1.

Returns

Returns a String value equal to the rightmost num_chars character(s) in str .