$right
Extracts a segment from the end of a character string.
Syntax
$right(source,length)
Parameters
source | a character string, or an expression that evaluates to a character string |
length | a number, or an expression that evaluates to a number |
Return Value
Character string, consisting of length characters from source, starting length character positions from the end of source.
Comments
Use $right to produce a string consisting of length characters from source, starting length character positions from the end of source.
If source is not of a character data type, it is converted to a character data type before the function is applied.
If length is zero or negative, the result is the null string.
If length is longer than source, the result is source.
Example
$right(“abcdefgh”,5)
Evaluates to “defgh”.
$right(1234,2)
Evaluates to “34”.
$right(1234567890,8)
Evaluates to “34567890”.
See Also