Translate

STD.Str.Translate( src, search, replacement )

STD.Uni.Translate( src, search, replacement )

srcA string containing the characters to search.
search A string containing the characters to be replaced by characters in the replacement string.
replacement A string containing the characters to act as replacements.
Return: Translate returns a STRING or UNICODE value, as appropriate.

The Translate functions return the src string with the replacement character substituted for all characters in the src string. The search string characters are replaced by the characters in the equivalent position in the replacement string.

If no search string characters are in the src string, it returns the src string unaltered.

Example:

IMPORT STD;
A := STD.Str.Translate('abcabc','ca','yz'); //A contains 'zbyzby'