gotools/internal/diff/ndiff.go

// Strings computes the differences between two strings.
// The resulting edits respect rune boundaries.
func Strings(before, after string) []Edit {}

// Bytes computes the differences between two byte slices.
// The resulting edits respect rune boundaries.
func Bytes(before, after []byte) []Edit {}

func diffASCII(before, after []byte) []Edit {}

func diffRunes(before, after []rune) []Edit {}

// runes is like []rune(string(bytes)) without the duplicate allocation.
func runes(bytes []byte) []rune {}

// runesLen returns the length in bytes of the UTF-8 encoding of runes.
func runesLen(runes []rune) (len int) {}

// isASCII reports whether s contains only ASCII.
func isASCII[S string | []byte](s S) bool {}