golang/src/unicode/utf16
Jes Cok ef4f2a0597 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>
2024-03-07 19:08:48 +00:00
..
export_test.go unicode/utf16: add func RuneLen 2024-03-07 19:08:48 +00:00
utf16.go unicode/utf16: add func RuneLen 2024-03-07 19:08:48 +00:00
utf16_test.go unicode/utf16: add func RuneLen 2024-03-07 19:08:48 +00:00