]> git.ipfire.org Git - thirdparty/systemd.git/blame - strv.h
Merge remote branch 'kay/master'
[thirdparty/systemd.git] / strv.h
CommitLineData
60918275
LP
1/*-*- Mode: C; c-basic-offset: 8 -*-*/
2
3#ifndef foostrvhfoo
4#define foostrvhfoo
5
6#include "macro.h"
7
8char *strv_find(char **l, const char *name);
9void strv_free(char **l);
10char **strv_copy(char **l);
11unsigned strv_length(char **l);
12
034c6ed7
LP
13char **strv_merge(char **a, char **b);
14
cba8922f
LP
15bool strv_contains(char **l, const char *s);
16
60918275
LP
17char **strv_new(const char *x, ...) __sentinel;
18
19#define STRV_FOREACH(s, l) \
cba8922f 20 for ((s) = (l); (s) && *(s); (s)++)
60918275
LP
21
22#define STRV_FOREACH_BACKWARDS(s, l) \
23 for (; (l) && ((s) >= (l)); (s)--)
24
25#endif