1
0
mirror of https://github.com/golang/go synced 2024-11-23 23:20:08 -07:00
go/src/strings
Martin Möhrmann 3259bc4419 strings, bytes: add ToValidUTF8
The newly added functions create a copy of their input with all bytes in
invalid UTF-8 byte sequences mapped to the UTF-8 byte sequence
given as replacement parameter.

Fixes #25805

Change-Id: Iaf65f65b40c0581c6bb000f1590408d6628321d0
Reviewed-on: https://go-review.googlesource.com/c/go/+/142003
Run-TryBot: Martin Möhrmann <moehrmann@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-05-01 18:31:47 +00:00
..
builder_test.go
builder.go
compare_test.go
compare.go
example_test.go
export_test.go
reader_test.go
reader.go
replace_test.go
replace.go strings: document that NewReplacer can panic 2019-04-03 20:15:58 +00:00
search_test.go
search.go
strings_test.go strings, bytes: add ToValidUTF8 2019-05-01 18:31:47 +00:00
strings.go strings, bytes: add ToValidUTF8 2019-05-01 18:31:47 +00:00