Open xiboon opened 3 months ago
@microsoft-github-policy-service agree
Could you add a test with replacing a string with multiple characters?
Added, also found a bug where replaceAll could loop infinitely so fixed that as well.
what if searchvalue equals replace value?
i believe it shouldn't be an issue, that was part of the bug with replaceAll because if replaceValue contained searchValue it would just match against it forever. Now, after replacing a match it only searches for the index after the position of the replacement value so it can't possibly match against the thing it just replaced. Should i add that as a test just in case anyways?
What if you replace "" with ""?
finishes 1 task off of #683