Lines Matching defs:str
23 s64 perf_atoll(const char *str)
29 if (!isdigit(str[0]))
32 length = strtoll(str, &p, 10);
110 static bool __match_glob(const char *str, const char *pat, bool ignore_space,
113 while (*str && *pat && *pat != '*') {
116 if (isspace(*str)) {
117 str++;
126 str++;
130 if (__match_charclass(pat + 1, *str, &pat)) {
131 str++;
138 if (tolower(*str) != tolower(*pat))
140 } else if (*str != *pat)
142 str++;
151 while (*str)
152 if (__match_glob(str++, pat, ignore_space, case_ins))
155 return !*str && !*pat;
160 * @str: the target string to match
163 * This returns true if the @str matches @pat. @pat can includes wildcards
170 bool strglobmatch(const char *str, const char *pat)
172 return __match_glob(str, pat, false, false);
175 bool strglobmatch_nocase(const char *str, const char *pat)
177 return __match_glob(str, pat, false, true);
182 * @str: the target string to match
188 bool strlazymatch(const char *str, const char *pat)
190 return __match_glob(str, pat, true, false);
251 char *strpbrk_esc(char *str, const char *stopset)
256 ptr = strpbrk(str, stopset);
257 if (ptr == str ||
258 (ptr == str + 1 && *(ptr - 1) != '\\'))
260 str = ptr + 1;
267 char *strpbrk_esq(char *str, const char *stopset)
278 ptr = strpbrk_esc(str, _stopset);
287 str = ptr + 1;
295 char *strdup_esc(const char *str)
297 char *s, *d, *p, *ret = strdup(str);
325 static char *remove_consumed_esc(char *str, int len, int quote)
327 char *ptr = str, *end = str + len;
345 char *strdup_esq(const char *str)
350 d = strpbrk_esc((char *)str, "\"'");
352 return strdup_esc(str);
354 ret = strdup(str);