Home | History | Annotate | Download | only in src

Lines Matching refs:pattern_length

89     int pattern_length = pattern_.length();
90 if (pattern_length < kBMMinPatternLength) {
91 if (pattern_length == 1) {
208 // Cache value of Max(0, pattern_length() - kBMMaxShift)
276 int pattern_length = pattern.length();
279 int n = subject.length() - pattern_length;
295 pattern_length - 1)) {
313 int pattern_length = pattern.length();
320 PatternChar last_char = pattern[pattern_length - 1];
323 while (index <= subject_length - pattern_length) {
324 int j = pattern_length - 1;
330 if (index > subject_length - pattern_length) {
340 index += pattern_length - 1
361 int pattern_length = pattern_.length();
364 // to pattern_length).
366 int length = pattern_length - start;
374 for (int i = start; i < pattern_length; i++) {
377 shift_table[pattern_length] = 1;
378 suffix_table[pattern_length] = pattern_length + 1;
380 if (pattern_length <= start) {
385 PatternChar last_char = pattern[pattern_length - 1];
386 int suffix = pattern_length + 1;
388 int i = pattern_length;
391 while (suffix <= pattern_length && c != pattern[suffix - 1]) {
398 if (suffix == pattern_length) {
401 if (shift_table[pattern_length] == length) {
402 shift_table[pattern_length] = pattern_length - i;
404 suffix_table[--i] = pattern_length;
413 if (suffix < pattern_length) {
414 for (int i = start; i <= pattern_length; i++) {
436 int pattern_length = pattern.length();
438 int badness = -pattern_length;
441 PatternChar last_char = pattern[pattern_length - 1];
442 int last_char_shift = pattern_length - 1 -
446 while (index <= subject_length - pattern_length) {
447 int j = pattern_length - 1;
454 if (index > subject_length - pattern_length) {
468 badness += (pattern_length - j) - last_char_shift;
482 int pattern_length = pattern_.length();
501 for (int i = start; i < pattern_length - 1; i++) {
520 int pattern_length = pattern.length();
524 int badness = -10 - (pattern_length << 2);
529 for (int i = index, n = subject.length() - pattern_length; i <= n; i++) {
550 } while (j < pattern_length);
551 if (j == pattern_length) {