Talk:Replace string
In reference to the RFI:
For example, with this:
replace_string("abababa","aba","X");
You get this:
Returned: XbX
I can't think of an example that would produce what's on my mind, and not even sure if it's possible, but if somehow there would be more replacements available if the first instance of a match was ignored, would this function prefer to do so, or does it indeed go left-to-right?
There are no such cases; going left-to-right (incidentally, also easier to code) is how all functions like this work.