diff options
author | Russ Cox <rsc@golang.org> | 2009-06-29 15:24:23 -0700 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2009-06-29 15:24:23 -0700 |
commit | 755e009ad2a874373454d488f9ea46648a8a9547 (patch) | |
tree | ed3d700304a76b08cdca0f356605077c58ee0f76 /src/pkg/regexp/regexp.go | |
parent | 24323437280c7f0a166b7f2fae75620470cde0f9 (diff) | |
download | golang-755e009ad2a874373454d488f9ea46648a8a9547.tar.gz |
io.StringBytes -> strings.Bytes
io.ByteBuffer -> bytes.Buffer
left io.ByteBuffer stub around for now,
for protocol compiler.
R=r
OCL=30861
CL=30872
Diffstat (limited to 'src/pkg/regexp/regexp.go')
-rw-r--r-- | src/pkg/regexp/regexp.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pkg/regexp/regexp.go b/src/pkg/regexp/regexp.go index 5fb606a27..1ab9246f6 100644 --- a/src/pkg/regexp/regexp.go +++ b/src/pkg/regexp/regexp.go @@ -23,6 +23,7 @@ package regexp import ( + "bytes"; "container/vector"; "io"; "os"; @@ -770,7 +771,7 @@ func Match(pattern string, s string) (matched bool, error os.Error) { func (re *Regexp) ReplaceAll(src, repl string) string { lastMatchEnd := 0; // end position of the most recent match searchPos := 0; // position where we next look for a match - buf := new(io.ByteBuffer); + buf := new(bytes.Buffer); for searchPos <= len(src) { a := re.doExecute(src, searchPos); if len(a) == 0 { |