]> Cypherpunks repositories - gostls13.git/commitdiff
unicode/utf8: update doc for RuneLen
authorJes Cok <xigua67damn@gmail.com>
Thu, 7 Mar 2024 23:34:10 +0000 (07:34 +0800)
committerGopher Robot <gobot@golang.org>
Fri, 8 Mar 2024 02:00:36 +0000 (02:00 +0000)
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 <iant@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Commit-Queue: Ian Lance Taylor <iant@google.com>

src/unicode/utf8/utf8.go

index 71d6bf18d01b531159c0dcc74b14566c8c36fcc6..c7389d4d6f584e9d626069d5bc38134a63f9b373 100644 (file)
@@ -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 {