1 /* SPDX-License-Identifier: GPL-2.0 */
5 #include <linux/types.h>
9 s64 perf_atoll(const char *str);
10 char **argv_split(const char *str, int *argcp);
11 void argv_free(char **argv);
12 bool strglobmatch(const char *str, const char *pat);
13 bool strglobmatch_nocase(const char *str, const char *pat);
14 bool strlazymatch(const char *str, const char *pat);
15 static inline bool strisglob(const char *str)
17 return strpbrk(str, "*?[") != NULL;
19 int strtailcmp(const char *s1, const char *s2);
20 char *strxfrchar(char *s, char from, char to);
25 static inline char *trim(char *s)
27 return ltrim(rtrim(s));
30 char *asprintf_expr_inout_ints(const char *var, bool in, size_t nints, int *ints);
32 static inline char *asprintf_expr_in_ints(const char *var, size_t nints, int *ints)
34 return asprintf_expr_inout_ints(var, true, nints, ints);
37 static inline char *asprintf_expr_not_in_ints(const char *var, size_t nints, int *ints)
39 return asprintf_expr_inout_ints(var, false, nints, ints);
43 #endif /* PERF_STRING_H */