summaryrefslogtreecommitdiff
path: root/src/pkg/regexp
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2009-09-17 23:51:06 -0700
committerRob Pike <r@golang.org>2009-09-17 23:51:06 -0700
commit7b79ee2545d11bb332aa2ba5e2b1a2509b0aa313 (patch)
treedf353ed3ad6cfa68e97dbaba2e601842547d1dd5 /src/pkg/regexp
parent94cb5a646b38b4ac3c4b9e04409e6e5a5e6d5056 (diff)
downloadgolang-7b79ee2545d11bb332aa2ba5e2b1a2509b0aa313.tar.gz
use buf.String() instead of string(buf.Bytes())
use strings.Buffer instead of bytes.Buffer in some places R=rsc DELTA=40 (0 added, 3 deleted, 37 changed) OCL=34770 CL=34775
Diffstat (limited to 'src/pkg/regexp')
-rw-r--r--src/pkg/regexp/regexp.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/regexp/regexp.go b/src/pkg/regexp/regexp.go
index 1559da23e..f754418ec 100644
--- a/src/pkg/regexp/regexp.go
+++ b/src/pkg/regexp/regexp.go
@@ -883,7 +883,7 @@ func (re *Regexp) ReplaceAllString(src, repl string) string {
// Copy the unmatched characters after the last match.
io.WriteString(buf, src[lastMatchEnd:len(src)]);
- return string(buf.Bytes());
+ return buf.String();
}
// ReplaceAll returns a copy of src in which all matches for the Regexp