mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
utf8: make EncodeRune's destination the first argument.
R=r CC=golang-dev https://golang.org/cl/3364041
This commit is contained in:
parent
287045085d
commit
3cb4bdb9ce
14 changed files with 21 additions and 233 deletions
|
|
@ -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])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue