Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CaseFinder ¶
type CaseFinder Finder
CaseFinder is a Finder that ignores case for ASCII letters (but not for letters with multibyte UTF-8 encodings).
func NewCaseFinder ¶
func NewCaseFinder(pattern string) *CaseFinder
func (*CaseFinder) Next ¶
func (f *CaseFinder) Next(text string) int
Next returns the index in text of the first occurrence of the pattern. If the pattern is not found, it returns -1.
type Finder ¶
type Finder struct {
// contains filtered or unexported fields
}
Finder efficiently finds strings in a source text. It's implemented using the Boyer-Moore string search algorithm: https://en.wikipedia.org/wiki/Boyer-Moore_string_search_algorithm https://www.cs.utexas.edu/~moore/publications/fstrpos.pdf (note: this aged document uses 1-based indexing)
Click to show internal directories.
Click to hide internal directories.