From 69583738eb73ef928a07a1e215b719823fd27aa9 Mon Sep 17 00:00:00 2001 From: Jes Cok Date: Fri, 8 Mar 2024 07:34:10 +0800 Subject: [PATCH] unicode/utf8: update doc for RuneLen As CL 569755 did, for consistency, this CL slightly improves the documentation for RuneLen. Change-Id: Ic9776648baf2809af36cd16a94d1313938bb0e52 Reviewed-on: https://go-review.googlesource.com/c/go/+/569816 Auto-Submit: Ian Lance Taylor Reviewed-by: Michael Knyszek LUCI-TryBot-Result: Go LUCI Reviewed-by: Ian Lance Taylor Commit-Queue: Ian Lance Taylor --- src/unicode/utf8/utf8.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/unicode/utf8/utf8.go b/src/unicode/utf8/utf8.go index 71d6bf18d0..c7389d4d6f 100644 --- a/src/unicode/utf8/utf8.go +++ b/src/unicode/utf8/utf8.go @@ -316,7 +316,7 @@ func DecodeLastRuneInString(s string) (r rune, size int) { return r, size } -// RuneLen returns the number of bytes required to encode the rune. +// RuneLen returns the number of bytes in the UTF-8 encoding of the rune. // It returns -1 if the rune is not a valid value to encode in UTF-8. func RuneLen(r rune) int { switch {