]> Cypherpunks repositories - gostls13.git/commit
strings: add Replacer, NewReplacer
authorBrad Fitzpatrick <bradfitz@golang.org>
Wed, 28 Sep 2011 16:34:26 +0000 (09:34 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 28 Sep 2011 16:34:26 +0000 (09:34 -0700)
commit7b0f3caa26a46f2d8ef277ff677efec899618871
treee6060321e4eb713d311f4a624579591eab4cdd32
parent58a5f1e84f4e6679ffb70a0cc81d786e078b4ef7
strings: add Replacer, NewReplacer

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
src/pkg/strings/Makefile
src/pkg/strings/replace.go [new file with mode: 0644]
src/pkg/strings/replace_test.go [new file with mode: 0644]