From 3cb4bdb9ce7135a107ab35e64b39dab9f22acfa1 Mon Sep 17 00:00:00 2001 From: Adam Langley Date: Tue, 30 Nov 2010 16:59:43 -0500 Subject: utf8: make EncodeRune's destination the first argument. R=r CC=golang-dev https://golang.org/cl/3364041 --- src/pkg/strings/strings.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/pkg/strings/strings.go') diff --git a/src/pkg/strings/strings.go b/src/pkg/strings/strings.go index 8bf86dadd0..d8c695226d 100644 --- a/src/pkg/strings/strings.go +++ b/src/pkg/strings/strings.go @@ -317,7 +317,7 @@ func Map(mapping func(rune int) int, s string) string { copy(nb, b[0:nbytes]) b = nb } - nbytes += utf8.EncodeRune(rune, b[nbytes:maxbytes]) + nbytes += utf8.EncodeRune(b[nbytes:maxbytes], rune) } } return string(b[0:nbytes]) -- cgit v1.3-5-g9baa