Product SiteDocumentation Site

7.4.13. CHANGESTR


>>-CHANGESTR(needle,haystack,newneedle--+--------+--)------------------------><
                                        +-,count-+

Returns a copy of haystack in which newneedle replaces occurrences of needle. If count is not specified, all occurrences of needle are replaced. If count is specified, it must be a positive, whole number that gives the maximum number of occurrences to be replaced.
Here are some examples:

Example 7.19. Builtin function CHANGESTR

CHANGESTR("1","101100","")     ->    "000"
CHANGESTR("1","101100","X")    ->    "X0XX00"
CHANGESTR("1","101100","X", 1) ->    "X01100"