Home | History | Annotate | Download | only in strings

Lines Matching full:last

16 	// badCharSkip[b] contains the distance between the last byte of pattern
53 // last is the index of the last character in the pattern.
54 last := len(pattern) - 1
61 // The loop condition is < instead of <= so that the last byte does not
63 // that it is not in the last position.
64 for i := 0; i < last; i++ {
65 f.badCharSkip[pattern[i]] = last - i
71 lastPrefix := last
72 for i := last; i >= 0; i-- {
76 // lastPrefix is the shift, and (last-i) is len(suffix).
77 f.goodSuffixSkip[i] = lastPrefix + last - i
80 for i := 0; i < last; i++ {
82 if pattern[i-lenSuffix] != pattern[last-lenSuffix] {
83 // (last-i) is the shift, and lenSuffix is len(suffix).
84 f.goodSuffixSkip[last-lenSuffix] = lenSuffix + last - i