go/src/bytes
Joe Tsai 9a4685f220 strings: avoid utf8.RuneError mangling in Split
Split should only split strings and not perform mangling
of invalid UTF-8 into ut8.RuneError.
The prior behavior is clearly a bug since mangling is not
performed in all other situations (e.g., separator is non-empty).

Fixes #53511

Change-Id: I112a2ef15ee46ddecda015ee14bca04cd76adfbf
Reviewed-on: https://go-review.googlesource.com/c/go/+/413715
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-08-08 20:44:51 +00:00
..
boundary_test.go bytes: test for page boundary crosses on sep of Index 2021-11-02 17:31:50 +00:00
buffer.go bytes: rely on runtime.growslice for growing 2022-03-10 16:24:16 +00:00
buffer_test.go bytes: rely on runtime.growslice for growing 2022-03-10 16:24:16 +00:00
bytes.go bytes: explode checks for n too large 2022-04-16 02:01:19 +00:00
bytes_test.go strings: avoid utf8.RuneError mangling in Split 2022-08-08 20:44:51 +00:00
compare_test.go
example_test.go bytes: add example with (*Buffer).Cap, (*Buffer).Read, (*Buffer).ReadByte 2021-11-05 21:26:54 +00:00
export_test.go
reader.go bytes: document that Reader.Reset affects the result of Size 2022-07-26 14:20:34 +00:00
reader_test.go all: gofmt -w -r 'interface{} -> any' src 2021-12-13 18:45:54 +00:00