...

Package utf8

import "github.com/bytedance/sonic/utf8"
Overview
Index

Overview ▾

func CorrectWith

func CorrectWith(dst []byte, src []byte, repl string) []byte

CorrectWith corrects the invalid utf8 byte with repl string.

func Validate

func Validate(src []byte) bool

Validate is a simd-accelereated drop-in replacement for the standard library's utf8.Valid.

func ValidateString

func ValidateString(src string) bool

ValidateString as Validate, but for string.