From 7b79ee2545d11bb332aa2ba5e2b1a2509b0aa313 Mon Sep 17 00:00:00 2001 From: Rob Pike Date: Thu, 17 Sep 2009 23:51:06 -0700 Subject: 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 --- src/pkg/regexp/regexp.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/pkg/regexp/regexp.go') 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 -- cgit v1.2.3