• Brad Fitzpatrick's avatar
    strings: add Replacer, NewReplacer · 7b0f3caa
    Brad Fitzpatrick authored
    This is just a new API to do many replacements at once.
    
    While the point of this API is to be faster than doing replacements one
    at a time, the implementation in this CL has the optimizations removed
    and may actually be slower.
    
    Future CLs will bring back & add optimizations.
    
    R=r, rsc, rogpeppe
    CC=golang-dev
    https://golang.org/cl/5081042
    7b0f3caa
replace.go 1.86 KB