Merge tag 'powerpc-5.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
[linux/fpc-iii.git] / tools / perf / util / string2.h
blob73df616ced4302cdd279d5d96b84aa90646b5d02
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef PERF_STRING_H
3 #define PERF_STRING_H
5 #include <linux/string.h>
6 #include <linux/types.h>
7 #include <sys/types.h> // pid_t
8 #include <stddef.h>
9 #include <string.h>
11 extern const char *graph_dotted_line;
12 extern const char *dots;
14 s64 perf_atoll(const char *str);
15 bool strglobmatch(const char *str, const char *pat);
16 bool strglobmatch_nocase(const char *str, const char *pat);
17 bool strlazymatch(const char *str, const char *pat);
18 static inline bool strisglob(const char *str)
20 return strpbrk(str, "*?[") != NULL;
22 int strtailcmp(const char *s1, const char *s2);
24 char *asprintf_expr_inout_ints(const char *var, bool in, size_t nints, int *ints);
26 static inline char *asprintf_expr_in_ints(const char *var, size_t nints, int *ints)
28 return asprintf_expr_inout_ints(var, true, nints, ints);
31 static inline char *asprintf_expr_not_in_ints(const char *var, size_t nints, int *ints)
33 return asprintf_expr_inout_ints(var, false, nints, ints);
36 char *asprintf__tp_filter_pids(size_t npids, pid_t *pids);
38 char *strpbrk_esc(char *str, const char *stopset);
39 char *strdup_esc(const char *str);
41 #endif /* PERF_STRING_H */