Commit | Line | Data |
---|---|---|
231b5333 PP |
1 | #ifndef _LTTNG_STRING_UTILS_H |
2 | #define _LTTNG_STRING_UTILS_H | |
3 | ||
4 | /* | |
5 | * Copyright (C) 2017 Philippe Proulx <pproulx@efficios.com> | |
6 | * | |
7 | * This library is free software; you can redistribute it and/or | |
8 | * modify it under the terms of the GNU Lesser General Public | |
9 | * License as published by the Free Software Foundation; only | |
10 | * version 2.1 of the License. | |
11 | * | |
12 | * This library is distributed in the hope that it will be useful, | |
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 | * Lesser General Public License for more details. | |
16 | * | |
17 | * You should have received a copy of the GNU Lesser General Public | |
18 | * License along with this library; if not, write to the Free Software | |
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
20 | */ | |
21 | ||
22 | #include <stdbool.h> | |
23 | ||
24 | typedef char (*strutils_get_char_at_cb)(size_t, void *); | |
25 | ||
26 | bool strutils_is_star_glob_pattern(const char *pattern); | |
27 | bool strutils_is_star_at_the_end_only_glob_pattern(const char *pattern); | |
28 | bool strutils_star_glob_match(const char *pattern, size_t pattern_len, | |
29 | const char *candidate, size_t candidate_len); | |
30 | bool strutils_star_glob_match_char_cb( | |
31 | strutils_get_char_at_cb pattern_get_char_at_cb, | |
32 | void *pattern_get_char_at_cb_data, | |
33 | strutils_get_char_at_cb candidate_get_char_at_cb, | |
34 | void *candidate_get_char_at_cb_data); | |
35 | ||
36 | #endif /* _LTTNG_STRING_UTILS_H */ |