canjs / can-util

Essential utilities used by lots of CanJS's projects.
https://canjs.com/doc/can-util.html
MIT License
10 stars 8 forks source link

Add string.replaceWith #402

Closed andrejewski closed 6 years ago

andrejewski commented 6 years ago

Needed for can-connect URL parameter encoding. This may not be the right place to add a new function however, just want to get an implementation pushed up for discussion.

matthewp commented 6 years ago

👍 I think this is a good addition. It overlaps with string.sub a little bit, that's my only concern, but I think maybe it's different enough to warrant a new method.