RIGHT() |
|
|
The RIGHT() function returns the trailing part of a string.
Format
RIGHT(string, len)
where
The RIGHT() function returns the rightmost length characters from the given string. If length is greater than the number of characters in the string, the entire string is returned.
This function is identical in effect to use of the rightmost substring assignment operator. Thus the following two statements are equivalent: SUBSTR = RIGHT(VAR, length) SUBSTR = VAR[length]
Example
A = "ABCDEFGHIJK" S = RIGHT(A, 3)
This program fragment assigns the string "IJK" to variable S.
See also: |