summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/utf8.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/utf8.go b/src/lib/utf8.go
index e7a5594b9..448f4819c 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]);
}