Documentation ¶
Index ¶
- Constants
- Variables
- func Compare(a, b []byte) int
- func Count(b []byte, c byte) int
- func CountString(s string, c byte) int
- func Cutover(n int) int
- func Equal(a, b []byte) bool
- func Index(a, b []byte) int
- func IndexByte(b []byte, c byte) int
- func IndexByteString(s string, c byte) int
- func IndexString(a, b string) int
Constants ¶
View Source
const MaxBruteForce = 64
Variables ¶
View Source
var MaxLen int
MaxLen is the maximum length of the string to be searched for (argument b) in Index.
Functions ¶
func CountString ¶
func Cutover ¶
Cutover reports the number of failures of IndexByte we should tolerate before switching over to Index. n is the number of bytes processed so far. See the bytes.Index implementation for details.
func Index ¶
Index returns the index of the first instance of b in a, or -1 if b is not present in a. Requires 2 <= len(b) <= MaxLen.
func IndexByteString ¶
func IndexString ¶
IndexString returns the index of the first instance of b in a, or -1 if b is not present in a. Requires 2 <= len(b) <= MaxLen.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.