TRANSLATE returns a CHARACTER string of the same length as x, but with selected characters translated.
|
x should have CHARACTER type, and if not, it is converted thereto.
y should have CHARACTER type, and if not, it is converted thereto.
z should have CHARACTER type, and if not, it is converted thereto.
TRANSLATE operates on each character of x as follows:
If a character in x is found in z, the character in y that corresponds to that in z is copied to the result; otherwise, the character in x is copied directly to the result. If z contains duplicates, the leftmost occurrence is used.
y is padded with blanks, or truncated, on the right to match the length of z.