diff options
author | Russ Cox <rsc@golang.org> | 2010-06-30 18:03:09 -0700 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2010-06-30 18:03:09 -0700 |
commit | e916e0c1f1bfe728be44283cf6e126260f360378 (patch) | |
tree | e297c4de381a3d156ebc081e8711382bfee55c34 /lib/codereview/codereview.py | |
parent | f5e13a95a7d0ac677ab8cf31d7140a9b734fa983 (diff) | |
download | golang-e916e0c1f1bfe728be44283cf6e126260f360378.tar.gz |
bytes, strings: add Replace
This is the Replace I suggested in the review of CL 1114041.
It's true that we already have
regexp.MustCompile(regexp.QuoteMeta(old)).ReplaceAll(s, new)
but because this Replace is doing a simpler job it is
simpler to call and inherently more efficient.
I will add the bytes implementation and tests to the
CL after the strings one has been reviewed.
R=r, cw
CC=golang-dev
http://codereview.appspot.com/1731048
Diffstat (limited to 'lib/codereview/codereview.py')
0 files changed, 0 insertions, 0 deletions