mirror of
https://github.com/golang/go
synced 2024-11-24 21:00:09 -07:00
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 <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>
This commit is contained in:
parent
5a329c3bfb
commit
69583738eb
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user