Investment Studio > Expressions > Functions > Text > RIGHT

string right(string in_string, integer length = 1)

Returns a string consisting of the length rightmost characters in in_string. The specified length must be >= 0; if it exceeds the length of in_string, the entire string is returned.

If length is omitted, it defaults to 1.

Examples

=right("This is a string")

equals "g"

=right("This is a string", 6)

equals "string"

=right("This is a string", 100)

equals "This is a string".

See also left, len, mid.