utf8
v1.15.5
github.com/bytedance/sonic/utf8
Documentation
pkg.go.dev ↗Functions
CorrectWith
func CorrectWith(dst []byte, src []byte, repl string) []byte
CorrectWith corrects the invalid utf8 byte with repl string.
Validate
func Validate(src []byte) bool
Validate is a simd-accelerated drop-in replacement for the standard library's utf8.Valid.
ValidateString
func ValidateString(src string) bool
ValidateString as Validate, but for string.