/third_party/curl/src/ |
H A D | tool_urlglob.c | 42 struct URLPattern *pat = &glob->pattern[glob->size]; in glob_fixed() local 43 pat->type = UPTSet; in glob_fixed() 44 pat->content.Set.size = 1; in glob_fixed() 45 pat->content.Set.ptr_s = 0; in glob_fixed() 46 pat->globindex = -1; in glob_fixed() 48 pat->content.Set.elements = malloc(sizeof(char *)); in glob_fixed() 50 if(!pat->content.Set.elements) in glob_fixed() 53 pat->content.Set.elements[0] = malloc(len + 1); in glob_fixed() 54 if(!pat->content.Set.elements[0]) in glob_fixed() 57 memcpy(pat in glob_fixed() 97 struct URLPattern *pat; glob_set() local 195 struct URLPattern *pat; glob_range() local 532 struct URLPattern *pat; glob_next_url() local 644 struct URLPattern *pat = NULL; glob_match_url() local [all...] |
/third_party/musl/src/regex/ |
H A D | fnmatch.c | 49 static int pat_next(const char *pat, size_t m, size_t *step, int flags) in pat_next() argument 52 if (!m || !*pat) { in pat_next() 57 if (pat[0]=='\\' && pat[1] && !(flags & FNM_NOESCAPE)) { in pat_next() 59 pat++; in pat_next() 63 if (pat[0]=='[') { in pat_next() 65 if (k<m) if (pat[k] == '^' || pat[k] == '!') k++; in pat_next() 66 if (k<m) if (pat[k] == ']') k++; in pat_next() 67 for (; k<m && pat[ in pat_next() 163 fnmatch_internal(const char *pat, size_t m, const char *str, size_t n, int flags) fnmatch_internal() argument 298 fnmatch(const char *pat, const char *str, int flags) fnmatch() argument [all...] |
H A D | glob.c | 35 static int do_glob(char *buf, size_t pos, int type, char *pat, int flags, int (*errfunc)(const char *path, int err), struct match **tail) in do_glob() argument 42 if (*pat && type!=DT_DIR) type = 0; in do_glob() 43 while (pos+1 < PATH_MAX && *pat=='/') buf[pos++] = *pat++; in do_glob() 49 for (; pat[i]!='*' && pat[i]!='?' && (!in_bracket || pat[i]!=']'); i++) { in do_glob() 50 if (!pat[i]) { in do_glob() 52 pat += i; in do_glob() 56 } else if (pat[ in do_glob() 194 expand_tilde(char **pat, char *buf, size_t *pos) expand_tilde() argument 227 glob(const char *restrict pat, int flags, int (*errfunc)(const char *path, int err), glob_t *restrict g) glob() argument [all...] |
/third_party/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/ |
H A D | IntlTestDecimalFormatAPI.java | 63 String pat = ",##0.0000"; in testJB1871() 64 DecimalFormat dec = new DecimalFormat(pat); in testJB1871() 69 errln("Fail: " + number + " x \"" + pat + "\" = \"" + in testJB1871() 73 pat = ",##0.0001"; in testJB1871() 74 dec = new DecimalFormat(pat); in testJB1871() 78 errln("Fail: " + number + " x \"" + pat + "\" = \"" + in testJB1871() 83 pat = ",##0.00000000000000000001"; in testJB1871() 84 dec = new DecimalFormat(pat); in testJB1871() 91 errln("Fail: " + bignumber + " x \"" + pat + "\" = \"" + in testJB1871() 114 DecimalFormat pat in TestAPI() [all...] |
H A D | IntlTestDecimalFormatAPIC.java | 61 DecimalFormat pat = null; in TestAPI() 63 pat = new DecimalFormat(pattern); in TestAPI() 115 res2 = pat.format(l, res2, pos2); in TestAPI() 131 pat.applyPattern(patt); in TestAPI() 132 double d2 = pat.parse(text, pos).doubleValue(); in TestAPI() 143 final DecimalFormatSymbols syms = pat.getDecimalFormatSymbols(); in TestAPI() 145 if (!pat.getDecimalFormatSymbols().equals(def.getDecimalFormatSymbols())) { in TestAPI() 150 pat.setPositivePrefix("+"); in TestAPI() 151 posPrefix = pat.getPositivePrefix(); in TestAPI() 156 pat in TestAPI() [all...] |
H A D | IntlTestSimpleDateFormatAPI.java | 59 SimpleDateFormat pat = new SimpleDateFormat(pattern); in TestAPI() 116 final DateFormatSymbols syms = pat.getDateFormatSymbols(); in TestAPI() 119 if( ! pat.getDateFormatSymbols().equals(def.getDateFormatSymbols()) ) { in TestAPI() 127 // startDate = pat.getTwoDigitStartDate(); in TestAPI() 146 pat.applyPattern(p1); in TestAPI() 148 String s2 = pat.toPattern(); in TestAPI() 155 pat.applyLocalizedPattern(p1); in TestAPI() 156 String s3 = pat.toLocalizedPattern(); in TestAPI() 167 pat.applyPattern(p2); in TestAPI() 168 Date dt = pat in TestAPI() [all...] |
/third_party/icu/ohos_icu4j/src/main/tests/ohos/global/icu/dev/test/format/ |
H A D | IntlTestDecimalFormatAPI.java | 66 String pat = ",##0.0000"; in testJB1871() 67 DecimalFormat dec = new DecimalFormat(pat); in testJB1871() 72 errln("Fail: " + number + " x \"" + pat + "\" = \"" + in testJB1871() 76 pat = ",##0.0001"; in testJB1871() 77 dec = new DecimalFormat(pat); in testJB1871() 81 errln("Fail: " + number + " x \"" + pat + "\" = \"" + in testJB1871() 86 pat = ",##0.00000000000000000001"; in testJB1871() 87 dec = new DecimalFormat(pat); in testJB1871() 94 errln("Fail: " + bignumber + " x \"" + pat + "\" = \"" + in testJB1871() 117 DecimalFormat pat in TestAPI() [all...] |
H A D | IntlTestDecimalFormatAPIC.java | 64 DecimalFormat pat = null; in TestAPI() 66 pat = new DecimalFormat(pattern); in TestAPI() 118 res2 = pat.format(l, res2, pos2); in TestAPI() 134 pat.applyPattern(patt); in TestAPI() 135 double d2 = pat.parse(text, pos).doubleValue(); in TestAPI() 146 final DecimalFormatSymbols syms = pat.getDecimalFormatSymbols(); in TestAPI() 148 if (!pat.getDecimalFormatSymbols().equals(def.getDecimalFormatSymbols())) { in TestAPI() 153 pat.setPositivePrefix("+"); in TestAPI() 154 posPrefix = pat.getPositivePrefix(); in TestAPI() 159 pat in TestAPI() [all...] |
H A D | IntlTestSimpleDateFormatAPI.java | 62 SimpleDateFormat pat = new SimpleDateFormat(pattern); in TestAPI() 119 final DateFormatSymbols syms = pat.getDateFormatSymbols(); in TestAPI() 122 if( ! pat.getDateFormatSymbols().equals(def.getDateFormatSymbols()) ) { in TestAPI() 130 // startDate = pat.getTwoDigitStartDate(); in TestAPI() 149 pat.applyPattern(p1); in TestAPI() 151 String s2 = pat.toPattern(); in TestAPI() 158 pat.applyLocalizedPattern(p1); in TestAPI() 159 String s3 = pat.toLocalizedPattern(); in TestAPI() 170 pat.applyPattern(p2); in TestAPI() 171 Date dt = pat in TestAPI() [all...] |
/third_party/python/Lib/ |
H A D | fnmatch.py | 19 def fnmatch(name, pat): 35 pat = os.path.normcase(pat) 36 return fnmatchcase(name, pat) 39 def _compile_pattern(pat): 40 if isinstance(pat, bytes): 41 pat_str = str(pat, 'ISO-8859-1') 45 res = translate(pat) 48 def filter(names, pat): 51 pat [all...] |
/third_party/rust/crates/os_str_bytes/src/ |
H A D | raw_str.rs | 40 fn find(string: &[u8], pat: &[u8]) -> Option<usize> { in find() 41 (0..=string.len().checked_sub(pat.len())?) in find() 42 .find(|&x| string[x..].starts_with(pat)) in find() 46 fn rfind(string: &[u8], pat: &[u8]) -> Option<usize> { in rfind() 47 (pat.len()..=string.len()) in rfind() 48 .rfind(|&x| string[..x].ends_with(pat)) in rfind() 49 .map(|x| x - pat.len()) in rfind() 91 /// `O(self.raw_len() * pat.len())`). Enabling the "memchr" feature allows 309 pub fn contains<P>(&self, pat: P) -> bool in contains() 313 self.find(pat) in contains() [all...] |
/third_party/python/Lib/idlelib/ |
H A D | searchengine.py | 40 def setpat(self, pat): 41 self.patvar.set(pat) 60 def setcookedpat(self, pat): 64 pat = re.escape(pat) 65 self.setpat(pat) 68 pat = self.getpat() 70 pat = re.escape(pat) 72 pat [all...] |
/third_party/rust/crates/glob/src/ |
H A D | lib.rs | 1141 let pat = Pattern::new("some/**/needle.txt").unwrap(); in test_recursive_wildcards() 1142 assert!(pat.matches("some/needle.txt")); in test_recursive_wildcards() 1143 assert!(pat.matches("some/one/needle.txt")); in test_recursive_wildcards() 1144 assert!(pat.matches("some/one/two/needle.txt")); in test_recursive_wildcards() 1145 assert!(pat.matches("some/other/needle.txt")); in test_recursive_wildcards() 1146 assert!(!pat.matches("some/other/notthis.txt")); in test_recursive_wildcards() 1150 let pat = Pattern::new("**").unwrap(); in test_recursive_wildcards() 1151 assert!(pat.is_recursive); in test_recursive_wildcards() 1152 assert!(pat.matches("abcde")); in test_recursive_wildcards() 1153 assert!(pat in test_recursive_wildcards() [all...] |
/third_party/python/Lib/idlelib/idle_test/ |
H A D | test_searchengine.py | 189 pat = '[a-z' 192 Equal(self.engine.report_error(pat, msg), None) 197 Equal(self.engine.report_error(pat, msg, 5), None) 217 cls.pat = re.compile('target') 233 pat = self.pat 236 #engine.revar.set(pat) 244 Equal(search(text, pat), ('f', (text, pat, 1, 5, True, False))) 246 Equal(search(text, pat), (' [all...] |
H A D | test_grep.py | 93 pat = '*.py' 96 filelist = list(ff(parent, pat, False)) 105 filelist = list(ff(parent, pat, True)) 123 def report(self, pat): 124 _grep.engine._pat = pat 126 _grep.grep_it(re.compile(pat), __file__) 132 pat = 'xyz*'*7 133 lines = self.report(pat) 135 self.assertIn(pat, lines[0]) 140 pat [all...] |
/third_party/icu/icu4c/source/common/ |
H A D | uset_props.cpp | 36 UnicodeString pat(patternLength==-1, pattern, patternLength); in uset_openPattern() 37 UnicodeSet* set = new UnicodeSet(pat, *ec); in uset_openPattern() 56 UnicodeString pat(patternLength==-1, pattern, patternLength); in uset_openPatternOptions() 57 UnicodeSet* set = new UnicodeSet(pat, options, NULL, *ec); in uset_openPatternOptions() 92 UnicodeString pat(pattern, patternLength); in uset_applyPattern() 96 ((UnicodeSet*) set)->applyPattern(pat, pos, options, NULL, *status); in uset_applyPattern() 123 UnicodeString pat(pattern, patternLength); in uset_resemblesPattern() 125 return ((pos+1) < pat.length() && in uset_resemblesPattern() 126 pat.charAt(pos) == (UChar)91/*[*/) || in uset_resemblesPattern() 127 UnicodeSet::resemblesPattern(pat, po in uset_resemblesPattern() 135 UnicodeString pat; uset_toPattern() local [all...] |
/third_party/node/deps/icu-small/source/common/ |
H A D | uset_props.cpp | 36 UnicodeString pat(patternLength==-1, pattern, patternLength); in uset_openPattern() 37 UnicodeSet* set = new UnicodeSet(pat, *ec); in uset_openPattern() 56 UnicodeString pat(patternLength==-1, pattern, patternLength); in uset_openPatternOptions() 57 UnicodeSet* set = new UnicodeSet(pat, options, nullptr, *ec); in uset_openPatternOptions() 92 UnicodeString pat(pattern, patternLength); in uset_applyPattern() 96 ((UnicodeSet*) set)->applyPattern(pat, pos, options, nullptr, *status); in uset_applyPattern() 123 UnicodeString pat(pattern, patternLength); in uset_resemblesPattern() 125 return ((pos+1) < pat.length() && in uset_resemblesPattern() 126 pat.charAt(pos) == (char16_t)91/*[*/) || in uset_resemblesPattern() 127 UnicodeSet::resemblesPattern(pat, po in uset_resemblesPattern() 135 UnicodeString pat; uset_toPattern() local [all...] |
/third_party/skia/third_party/externals/icu/source/common/ |
H A D | uset_props.cpp | 36 UnicodeString pat(patternLength==-1, pattern, patternLength); in uset_openPattern() 37 UnicodeSet* set = new UnicodeSet(pat, *ec); in uset_openPattern() 56 UnicodeString pat(patternLength==-1, pattern, patternLength); in uset_openPatternOptions() 57 UnicodeSet* set = new UnicodeSet(pat, options, NULL, *ec); in uset_openPatternOptions() 92 UnicodeString pat(pattern, patternLength); in uset_applyPattern() 96 ((UnicodeSet*) set)->applyPattern(pat, pos, options, NULL, *status); in uset_applyPattern() 123 UnicodeString pat(pattern, patternLength); in uset_resemblesPattern() 125 return ((pos+1) < pat.length() && in uset_resemblesPattern() 126 pat.charAt(pos) == (UChar)91/*[*/) || in uset_resemblesPattern() 127 UnicodeSet::resemblesPattern(pat, po in uset_resemblesPattern() 135 UnicodeString pat; uset_toPattern() local [all...] |
/third_party/ltp/testcases/kernel/fs/doio/ |
H A D | pattern.c | 40 int pattern_check(char *buf, int buflen, char *pat, int patlen, int patshift) in pattern_check() argument 60 return (memcmp(cp, pat + patshift, nleft) ? -1 : 0); in pattern_check() 62 if (memcmp(cp, pat + patshift, nb)) in pattern_check() 72 return (memcmp(cp, pat, nleft) ? -1 : 0); in pattern_check() 74 if (memcmp(cp, pat, nb)) in pattern_check() 101 int pattern_fill(char *buf, int buflen, char *pat, int patlen, int patshift) in pattern_fill() argument 121 memcpy(cp, pat + patshift, nleft); in pattern_fill() 124 memcpy(cp, pat + patshift, trans); in pattern_fill() 132 memcpy(cp, pat, nleft); in pattern_fill() 135 memcpy(cp, pat, tran in pattern_fill() [all...] |
/third_party/rust/crates/regex/scripts/ |
H A D | regex-match-tests.py | 22 opts, pat, text, sgroups = fields[0:4] 40 if pat == 'SAME': 41 pat = tests[-1][1] 43 pat = pat.decode('string_escape') 46 pat = '(?i)%s' % pat 49 tests.append((name, pat, text, groups)) 54 lineno, pat, text, groups = t 57 % (lineno, pat, '' i [all...] |
/foundation/communication/netmanager_ext/frameworks/native/mdnsclient/src/ |
H A D | mdns_common.cpp | 33 bool EndsWith(const std::string_view &str, const std::string_view &pat) in EndsWith() argument 35 if (str.length() < pat.length()) { in EndsWith() 38 return std::mismatch(pat.rbegin(), pat.rend(), str.rbegin()).first == pat.rend(); in EndsWith() 41 bool StartsWith(const std::string_view &str, const std::string_view &pat) in StartsWith() argument 43 if (str.length() < pat.length()) { in StartsWith() 46 return std::mismatch(pat.begin(), pat.end(), str.begin()).first == pat in StartsWith() [all...] |
/third_party/rust/crates/syn/src/ |
H A D | pat.rs | 76 // match pat { 79 // Pat::Box(pat) => {...} 80 // Pat::Ident(pat) => {...} 82 // Pat::Wild(pat) => {...} 125 pub pat: Box<Pat>, 136 pub pat: Box<Pat>, 199 pub pat: Box<Pat>, 224 pub pat: Box<Pat>, 241 /// `$:pat`. 314 /// This parser matches the behavior of the Rust 2021 edition's `$:pat` 372 let mut pat = Pat::parse_single(input)?; multi_pat_impl() variables [all...] |
/third_party/icu/icu4c/source/test/cintltst/ |
H A D | usettest.c | 313 char *pat; in expectContainment() local 323 pat=aescstrdup(ustr, length); in expectContainment() 340 log_verbose("Ok: %s %s \"%s\"\n", pat, in expectContainment() 344 log_data_err("FAIL: %s %s \"%s\" (Are you missing data?)\n", pat, in expectContainment() 357 log_verbose("Ok: %s %s '%c'\n", pat, in expectContainment() 361 log_data_err("FAIL: %s %s '%c' (Are you missing data?)\n", pat, in expectContainment() 372 log_verbose("Ok: %s %s U+%04X-U+%04X\n", pat, in expectContainment() 376 log_data_err("FAIL: %s %s U+%04X-U+%04X (Are you missing data?)\n", pat, in expectContainment() 390 log_verbose("Ok: %s %s U+%04X-U+%04X\n", pat, in expectContainment() 394 log_data_err("FAIL: %s %s U+%04X-U+%04X (Are you missing data?)\n", pat, in expectContainment() 415 char *pat; expectItems() local 602 USet *pat; TestBadPattern() local [all...] |
/third_party/musl/libc-test/src/regression/ |
H A D | regex-ere-backref.c | 9 char pat[] = "(a)\\1"; in main() local 13 n = regcomp(&r, pat, REG_EXTENDED); in main() 16 t_error("regcomp(%s) returned %d (%s) wanted 0\n", pat, n, buf); in main() 23 pat, n, buf); in main() 30 pat, n, buf); in main()
|
/third_party/python/Tools/ssl/ |
H A D | make_ssl_data.py | 30 def _file_search(fname, pat): 33 match = pat.search(line) 40 pat = re.compile(r"#\s*define\W+ERR_LIB_(\w+)\s+(\d+)") 42 for match in _file_search(args.err_h, pat): 52 pat = re.compile(r"^((\w+?)_R_(\w+)):(\d+):") 53 for match in _file_search(args.errtxt, pat): 64 pat = re.compile(r"^R\s+((\w+)_R_(\w+))\s+(\d+)") 65 for match in _file_search(args.errcodes, pat):
|