EREPLACE Function

The EREPLACE function swaps one string of characters for another.

Format

NEW=EREPLACE(Orig,String1,String2{,Occurs{,Start}})

Description

EREPLACE( ) returns a modified version of Orig, with all occurrences of String1 replaced with String2. If Occurs is omitted, all occurrences are assumed. If Start is omitted, replacement starts with the first occurrence.

It is perfectly acceptable for String2 to be null, or a different length from String1.

SWAP( ), CHANGE( ) and EREPLACE( ) are synonyms.

See Also

Statement and Function Reference