diff options
| author | Adam Langley <agl@golang.org> | 2010-11-30 16:59:43 -0500 |
|---|---|---|
| committer | Adam Langley <agl@golang.org> | 2010-11-30 16:59:43 -0500 |
| commit | 3cb4bdb9ce7135a107ab35e64b39dab9f22acfa1 (patch) | |
| tree | 5d19a4214d838ad9ee4570e387bed51bc8abc25c /src/pkg/strings | |
| parent | 287045085dedfb241a4af111b690bc424b74b166 (diff) | |
| download | go-3cb4bdb9ce7135a107ab35e64b39dab9f22acfa1.tar.xz | |
utf8: make EncodeRune's destination the first argument.
R=r
CC=golang-dev
https://golang.org/cl/3364041
Diffstat (limited to 'src/pkg/strings')
| -rw-r--r-- | src/pkg/strings/strings.go | 2 |
1 files changed, 1 insertions, 1 deletions
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]) |
