Commit | Line | Data |
---|---|---|
9f36eaed | 1 | /* SPDX-License-Identifier: (GPL-2.0 or LGPL-2.1) */ |
231b5333 PP |
2 | #ifndef _LTTNG_STRING_UTILS_H |
3 | #define _LTTNG_STRING_UTILS_H | |
4 | ||
5 | /* | |
6 | * Copyright (C) 2017 Philippe Proulx <pproulx@efficios.com> | |
231b5333 PP |
7 | */ |
8 | ||
9 | #include <stdbool.h> | |
10 | ||
11 | typedef char (*strutils_get_char_at_cb)(size_t, void *); | |
12 | ||
13 | bool strutils_is_star_glob_pattern(const char *pattern); | |
14 | bool strutils_is_star_at_the_end_only_glob_pattern(const char *pattern); | |
15 | bool strutils_star_glob_match(const char *pattern, size_t pattern_len, | |
16 | const char *candidate, size_t candidate_len); | |
17 | bool strutils_star_glob_match_char_cb( | |
18 | strutils_get_char_at_cb pattern_get_char_at_cb, | |
19 | void *pattern_get_char_at_cb_data, | |
20 | strutils_get_char_at_cb candidate_get_char_at_cb, | |
21 | void *candidate_get_char_at_cb_data); | |
22 | ||
23 | #endif /* _LTTNG_STRING_UTILS_H */ |