>>-TRANSLATE(string---------------------------------------------> >--+--------------------------------------------+--+-------------------------+-)->< +-,--+--------+--+-------------------------+-+ +-,--+-----+--+---------+-+ +-tableo-+ +-,--+--------+--+------+-+ +-pos-+ +-,length-+ +-tablei-+ +-,pad-+
a
-z
to uppercase A
-Z
), but, if you include pad, the language processor translates the entire string to pad characters. tablei defaults to XRANGE("00"x,"FF"x)
, and tableo defaults to the null string and is padded with pad or truncated as necessary. The default pad is a blank.
Example 7.93. Builtin function TRANSLATE
TRANSLATE("abcdef") -> "ABCDEF" TRANSLATE("abcdef", , , , 2, 3) -> "aBCDef" TRANSLATE("abcdef", "12", "ec") -> "ab2d1f" TRANSLATE("abcdef", "12", "abcd", ".") -> "12..ef" TRANSLATE("APQRV", , "PR") -> "A Q V" TRANSLATE("APQRV", XRANGE("00"X, "Q")) -> "APQ " TRANSLATE("4123", "abcd", "1234", , 2, 2) -> "4ab3" TRANSLATE("4123", "abcd", "1234") -> "dabc"
Note