| 1 | /* |
| 2 | * Copyright (C) 2017 Philippe Proulx <pproulx@efficios.com> |
| 3 | * |
| 4 | * SPDX-License-Identifier: GPL-2.0-only |
| 5 | * |
| 6 | */ |
| 7 | |
| 8 | #ifndef _STRING_UTILS_H |
| 9 | #define _STRING_UTILS_H |
| 10 | |
| 11 | #include <stdbool.h> |
| 12 | #include <common/macros.h> |
| 13 | |
| 14 | LTTNG_HIDDEN |
| 15 | void strutils_normalize_star_glob_pattern(char *pattern); |
| 16 | |
| 17 | LTTNG_HIDDEN |
| 18 | bool strutils_is_star_glob_pattern(const char *pattern); |
| 19 | |
| 20 | LTTNG_HIDDEN |
| 21 | bool strutils_is_star_at_the_end_only_glob_pattern(const char *pattern); |
| 22 | |
| 23 | LTTNG_HIDDEN |
| 24 | char *strutils_unescape_string(const char *input, char only_char); |
| 25 | |
| 26 | LTTNG_HIDDEN |
| 27 | char **strutils_split(const char *input, char delim, bool escape_delim); |
| 28 | |
| 29 | LTTNG_HIDDEN |
| 30 | void strutils_free_null_terminated_array_of_strings(char **array); |
| 31 | |
| 32 | LTTNG_HIDDEN |
| 33 | size_t strutils_array_of_strings_len(char * const *array); |
| 34 | |
| 35 | #endif /* _STRING_UTILS_H */ |