Commit | Line | Data |
---|---|---|
9c55c241 | 1 | /* |
ab5be9fa | 2 | * Copyright (C) 2017 Philippe Proulx <pproulx@efficios.com> |
9c55c241 | 3 | * |
ab5be9fa | 4 | * SPDX-License-Identifier: GPL-2.0-only |
9c55c241 | 5 | * |
9c55c241 PP |
6 | */ |
7 | ||
8 | #ifndef _STRING_UTILS_H | |
9 | #define _STRING_UTILS_H | |
10 | ||
11 | #include <stdbool.h> | |
f181fa5a | 12 | #include <common/macros.h> |
e358ddd5 | 13 | #include <common/dynamic-array.h> |
9c55c241 | 14 | |
48a40005 SM |
15 | #if defined(__cplusplus) |
16 | extern "C" { | |
17 | #endif | |
18 | ||
9c55c241 | 19 | void strutils_normalize_star_glob_pattern(char *pattern); |
f181fa5a | 20 | |
9c55c241 | 21 | bool strutils_is_star_glob_pattern(const char *pattern); |
f181fa5a | 22 | |
9c55c241 | 23 | bool strutils_is_star_at_the_end_only_glob_pattern(const char *pattern); |
f181fa5a | 24 | |
9c55c241 | 25 | char *strutils_unescape_string(const char *input, char only_char); |
f181fa5a | 26 | |
e358ddd5 JG |
27 | int strutils_split(const char *input, char delim, bool escape_delim, |
28 | struct lttng_dynamic_pointer_array *out_strings); | |
f181fa5a | 29 | |
9c55c241 | 30 | void strutils_free_null_terminated_array_of_strings(char **array); |
f181fa5a | 31 | |
9c55c241 PP |
32 | size_t strutils_array_of_strings_len(char * const *array); |
33 | ||
48a40005 SM |
34 | #if defined(__cplusplus) |
35 | } | |
36 | #endif | |
37 | ||
9c55c241 | 38 | #endif /* _STRING_UTILS_H */ |