TAIL Function

── TAIL ── ( ──<string expression>── , ──<string character set>── ) ───┤

The TAIL function returns a string whose value consists of the rightmost characters of the string expression beginning with the first character that is not a member of the string character set. If all characters in the string expression are members of the string character set, the null string is returned. If the first character of the string expression is not a member of the string character set, the entire string expression is returned.

The string character set must be of the same character type as the string expression. For an explanation of the string character set, see HEAD Function.

The TAIL function and the HEAD function are complementary functions. This means that for any string expression S and any string character set C, the following relation is always TRUE:

S = HEAD(S,C) CAT TAIL(S,C)

For additional information, see HEAD Function.

Examples of the TAIL Function

In the following examples, S is a string of length 9 that contains 8"ABC/1-2+3".

TAIL(S,NOT "-") = 8"-2+3"

TAIL(DROP(S,7),"+-") = 8"3"