Lines Matching refs:pattern
22 constexpr bool SearchForChars(const CHAR** pattern, in SearchForChars() argument
28 const CHAR* pattern_start = *pattern; in SearchForChars()
32 if (*pattern == pattern_end) { in SearchForChars()
39 if (!escape && IsWildcard(**pattern)) in SearchForChars()
44 if (!escape && **pattern == '\\') { in SearchForChars()
46 next(pattern, pattern_end); in SearchForChars()
56 const CHAR* pattern_next = *pattern; in SearchForChars()
61 *pattern = pattern_next; in SearchForChars()
79 *pattern = pattern_start; in SearchForChars()
90 constexpr int EatWildcards(const CHAR** pattern, const CHAR* end, NEXT next) { in EatWildcards() argument
93 while (*pattern != end) { in EatWildcards()
94 if (**pattern == '?') { in EatWildcards()
96 } else if (**pattern == '*') { in EatWildcards()
102 next(pattern, end); in EatWildcards()
110 const CHAR* pattern, in MatchPatternT() argument
114 int maximum_wildcard_length = EatWildcards(&pattern, pattern_end, next); in MatchPatternT()
115 if (!SearchForChars(&pattern, pattern_end, &eval, eval_end, in MatchPatternT()
119 } while (pattern != pattern_end); in MatchPatternT()
145 bool MatchPattern(StringPiece eval, StringPiece pattern) { in MatchPattern() argument
146 return MatchPatternT(eval.data(), eval.data() + eval.size(), pattern.data(), in MatchPattern()
147 pattern.data() + pattern.size(), NextCharUTF8()); in MatchPattern()
150 bool MatchPattern(StringPiece16 eval, StringPiece16 pattern) { in MatchPattern() argument
151 return MatchPatternT(eval.data(), eval.data() + eval.size(), pattern.data(), in MatchPattern()
152 pattern.data() + pattern.size(), NextCharUTF16()); in MatchPattern()