package
1.24.4
Repository: https://pkg.go.dev/std
Documentation: pkg.go.dev

# Functions

go:noescape.
No description provided by the author
go:noescape.
go:noescape.
Cutover reports the number of failures of IndexByte we should tolerate before switching over to Index.
Equal reports whether a and b are the same length and contain the same bytes.
HashStr returns the hash and the appropriate multiplicative factor for use in Rabin-Karp algorithm.
HashStrRev returns the hash of the reverse of sep and the appropriate multiplicative factor for use in Rabin-Karp algorithm.
Index returns the index of the first instance of b in a, or -1 if b is not present in a.
go:noescape.
go:noescape.
IndexRabinKarp uses the Rabin-Karp search algorithm to return the index of the first occurrence of sep in s, or -1 if not present.
IndexString returns the index of the first instance of b in a, or -1 if b is not present in a.
No description provided by the author
No description provided by the author
LastIndexRabinKarp uses the Rabin-Karp search algorithm to return the last index of the occurrence of sep in s, or -1 if not present.
MakeNoZero makes a slice of length n and capacity of at least n Bytes without zeroing the bytes (including the bytes between len and cap).

# Constants

Empirical data shows that using Index can get better performance when len(s) <= 16.
PrimeRK is the prime base used in Rabin-Karp algorithm.

# Variables

MaxLen is the maximum length of the string to be searched for (argument b) in Index.