1
0
mirror of https://github.com/golang/go synced 2024-11-11 21:20:21 -07:00
go/api/next
qmuntal 48297f1fb1 unicode/utf16: add AppendRune
AppendRune appends the UTF-16 encoding of a rune to a []uint16.

    BenchmarkEncodeValidASCII-12                24.61ns 16B 1allocs
    BenchmarkEncodeValidJapaneseChars-12        18.79ns 8B  1allocs
    BenchmarkAppendRuneValidASCII-12            6.826ns 0B  0allocs
    BenchmarkAppendRuneValidJapaneseChars-12    3.547ns 0B  0allocs

The ASCII case is written to be inlineable.

Fixes #51896

Change-Id: I593b1029f603297ef6e80e036f2fee2a0938d38d
Reviewed-on: https://go-review.googlesource.com/c/go/+/409054
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Joedian Reid <joedian@golang.org>
2022-08-19 16:45:08 +00:00
..
41773.txt net/http: add Server.DisableOptionsHandler for custom handling of OPTIONS * 2022-08-15 18:57:35 +00:00
42537.txt strings, bytes: add CutPrefix and CutSuffix 2022-08-16 19:48:39 +00:00
45038.txt bytes: add Clone function 2022-08-15 19:17:20 +00:00
51246.txt syscall: add new CLONE_ flags for Linux 2022-08-19 16:12:50 +00:00
51668.txt fmt: add a function to recover the original format string given a State 2022-08-06 09:19:31 +00:00
51896.txt unicode/utf16: add AppendRune 2022-08-19 16:45:08 +00:00
52221.txt crypto/ecdh: new package 2022-08-12 00:03:39 +00:00
52746.txt time: add DateTime, DateOnly, and TimeOnly 2022-08-09 14:33:24 +00:00
53002.txt net/http/httputil: add ReverseProxy.Rewrite 2022-08-16 20:01:36 +00:00
53021.txt crypto/subtle: add XORBytes 2022-08-17 18:47:33 +00:00
53200.txt go/token: add (*FileSet).RemoveFile(*File) method 2022-08-16 16:27:35 +00:00
54222.txt debug/elf: add new-style LoongArch reloc types 2022-08-11 19:32:40 +00:00
54251.txt debug/pe: add IMAGE_FILE_MACHINE_RISCV{32,64,128} 2022-08-09 01:21:43 +00:00