From: Robert Griesemer Date: Fri, 27 Mar 2009 16:49:11 +0000 (-0700) Subject: integrate feedback from rsc X-Git-Tag: weekly.2009-11-06~1952 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=5019a8db7fc5de588ae2070be8f7f3a794e9b610;p=gostls13.git integrate feedback from rsc R=rsc DELTA=2 (0 added, 0 deleted, 2 changed) OCL=26810 CL=26834 --- diff --git a/src/lib/utf8.go b/src/lib/utf8.go index e7a5594b90..448f4819cc 100644 --- a/src/lib/utf8.go +++ b/src/lib/utf8.go @@ -256,13 +256,13 @@ func EncodeRune(rune int, p []byte) int { return 4; } -// EncodeRuneToString returns the string corresponding to the UTF-8 encoding of the rune. +// EncodeRuneToString returns the UTF-8 encoding of the rune. func EncodeRuneToString(rune int) string { if rune < _Rune1Max { return string([1]byte{byte(rune)}) } - var buf[UTFMax] byte; + var buf [UTFMax]byte; size := EncodeRune(rune, buf); return string(buf[0:size]); }