CHANGE Function

The CHANGE function swaps one string of characters for another.

Format

NEW=CHANGE(Orig,Str1,Str2{,Occurs{,Start}})

Description

CHANGE( ) returns Orig with all occurrences of Str1 changed 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 synonyms.

See Also

Statement and Function Reference