REPLACEBY2 returns a nonvarying string formed by replacing some of the characters in x by a pair of characters.
>>-REPLACEBY2--(--x --, -y--,--z--)---------------------------><
REPLACEBY2 operates on each character of x as follows:
If a character in x is found in z, the character pair 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.
The string y must be twice as long as the string z.
As an example, REPLACEBY2( ’Rätsel’, ’aeoeuess’, ’äöüß’) returns the string ’Raetsel’.