Home | History | Annotate | Download | only in base

Lines Matching refs:pattern

923 static void EatSameChars(const CHAR** pattern, const CHAR* pattern_end,
927 while (*pattern != pattern_end && *string != string_end) {
928 if (!escape && IsWildcard(**pattern)) {
935 if (!escape && **pattern == '\\') {
936 escape = *pattern;
937 next(pattern, pattern_end);
942 const CHAR* pattern_next = *pattern;
947 *pattern = pattern_next;
956 *pattern = escape;
966 static void EatWildcard(const CHAR** pattern, const CHAR* end, NEXT next) {
967 while (*pattern != end) {
968 if (!IsWildcard(**pattern))
970 next(pattern, end);
976 const CHAR* pattern, const CHAR* pattern_end,
984 EatSameChars(&pattern, pattern_end, &eval, eval_end, next);
986 // If the string is empty, then the pattern must be empty too, or contains
989 EatWildcard(&pattern, pattern_end, next);
990 return pattern == pattern_end;
993 // Pattern is empty but not string, this is not a match.
994 if (pattern == pattern_end)
999 const CHAR* next_pattern = pattern;
1001 if (pattern[0] == '?') {
1013 // of the pattern.
1014 if (pattern[0] == '*') {
1026 // We reached the end of the string, let see if the pattern contains only
1029 EatWildcard(&pattern, pattern_end, next);
1030 if (pattern != pattern_end)
1060 const base::StringPiece& pattern) {
1062 pattern.data(), pattern.data() + pattern.size(),
1066 bool MatchPattern(const string16& eval, const string16& pattern) {
1068 pattern.c_str(), pattern.c_str() + pattern.size(),