The exchange() function replaces the characters specified in str.exp1 with the characters specified in str.exp2.
Syntax
exchange(var, str.exp1, str.exp2) |
Parameter(s)
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. |
Description
This function works identically to the convert() function except that the second two arguments are specified as hexadecimal numbers.
NOTE |
This function requires a nondefault compiler setting. Inserting the line $options ext at the beginning of the source code accomplishes this. |
Example(s)
The result, bbc, displays on the terminal.
crt exchange("abc",dtx(seq("a")),dtx(seq("b"))) |
See Also