The SWAP function swaps one string of characters for another.
Format
NEW=SWAP(Orig,Str1,Str2{,Occurs{,Start}}) |
Description
SWAP( ) returns a modified version of the string Orig, with all occurrences of Str1 swapped to Str2. If Occurs is omitted, all occurrences are assumed. If Start is omitted, swapping starts with the first occurrence.
It is perfectly acceptable for Str2 to be null or a different length from Str1.
NOTE |
SWAP( ), CHANGE( ) and EREPLACE( ) are identical in functionality. |
See Also