diff --git a/src/strings/replace.go b/src/strings/replace.go
index 9ddf5e1e3ff9612820a8c2dd82b13f4adf5073c8..ace0b8d646e38493d836e5d4b46ee09a78d4be69 100644
--- a/src/strings/replace.go
+++ b/src/strings/replace.go
@@ -459,7 +459,7 @@ func (r *byteReplacer) WriteString(w io.Writer, s string) (n int, err error) {
 	buf := make([]byte, bufsize)
 
 	for len(s) > 0 {
-		ncopy := copy(buf, s[:])
+		ncopy := copy(buf, s)
 		s = s[ncopy:]
 		for i, b := range buf[:ncopy] {
 			buf[i] = r[b]