The exchange() function replaces the characters specified in str.exp1 with the characters specified in str.exp2.
exchange(var, str.exp1, str.exp2)
var | Variable in which the specified string will be searched and replaced. |
str.exp1 | Specifies the characters to be replaced with the corresponding replacement characters from str.exp2. |
str.exp2 | Specifies the characters to replace the characters specified in str.exp1. |
This function works identically to the convert() function except that the second two arguments are specified as hexadecimal numbers.
The result, bbc, displays on the terminal.
crt exchange("abc",dtx(seq("a")),dtx(seq("b")))