]> Cypherpunks repositories - gostls13.git/commit
unicode/utf16: add func RuneLen
authorJes Cok <xigua67damn@gmail.com>
Thu, 7 Mar 2024 13:36:47 +0000 (21:36 +0800)
committerGopher Robot <gobot@golang.org>
Thu, 7 Mar 2024 19:08:48 +0000 (19:08 +0000)
commitef4f2a05972f9b729f5edb897d581f496675f588
tree3fd678ebc37afce98536a25a35c6fd7a70296dd8
parente0ba596c15dd82aad021c0c812fda6ca14ce118a
unicode/utf16: add func RuneLen

This CL adds func RuneLen, while here, also uses RuneLen to simplify
code in Encode.

Fixes #44940

Change-Id: Ifd3b537f69880dfd32a69a6733d8d3c2b5d4ecba
Reviewed-on: https://go-review.googlesource.com/c/go/+/569755
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Commit-Queue: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
api/next/44940.txt [new file with mode: 0644]
doc/next/6-stdlib/99-minor/unicode/utf16/44940.md [new file with mode: 0644]
src/unicode/utf16/export_test.go
src/unicode/utf16/utf16.go
src/unicode/utf16/utf16_test.go