When I wrote this function, I probably went overboard with optimizations (avoiding allocations). But using regular expressions for the simple string replacement is wasteful and unneeded.
I'm willing to accept your pull request if it uses the non-regex replace function.
When I wrote this function, I probably went overboard with optimizations (avoiding allocations). But using regular expressions for the simple string replacement is wasteful and unneeded.
I'm willing to accept your pull request if it uses the non-regex replace function.