diff options
Diffstat (limited to 'src/basic/string-util.h')
-rw-r--r-- | src/basic/string-util.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/basic/string-util.h b/src/basic/string-util.h index 75483924af..4430910e22 100644 --- a/src/basic/string-util.h +++ b/src/basic/string-util.h @@ -267,3 +267,8 @@ char *strdupspn(const char *a, const char *accept); char *strdupcspn(const char *a, const char *reject); char *find_line_startswith(const char *haystack, const char *needle); + +char *startswith_strv(const char *string, char **strv); + +#define STARTSWITH_SET(p, ...) \ + startswith_strv(p, STRV_MAKE(__VA_ARGS__)) |