stringy

package
v1.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BMH

func BMH(needle, haystack []byte) int

Returns the byte index of the first occurrence of needle in haystack, or -1.

func BMHRunes

func BMHRunes(needle, haystack []rune) int

func FindAllBM

func FindAllBM(pattern, text []byte) []int

FindAllBM returns all (overlapping) byte indices where pattern occurs.

func IndexBM

func IndexBM(pattern, text []byte) int

Returns the byte index of the first occurrence of pattern in text, or -1.

func IsHexadecimal

func IsHexadecimal(thing rune) bool

Is the given rune a valid component of a hexadecimal number?

func Levenshtein

func Levenshtein(a, b string) int

Levenshtein returns the edit distance between a and b, counting insertions, deletions, and substitutions (all cost = 1). It operates on runes (Unicode code points), not bytes.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL