summaryrefslogtreecommitdiff
path: root/strv.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-02-13 01:04:44 +0100
committerLennart Poettering <lennart@poettering.net>2010-02-13 01:04:44 +0100
commit5f9a22c3745a588883695e90bca00776b79610a4 (patch)
treeaf29852ddd8646cc0312486826d14f191433fd51 /strv.h
parentdfcd764ea64a61280eeb3902505b58aca06111f9 (diff)
strv: add various strv calls
Diffstat (limited to 'strv.h')
-rw-r--r--strv.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/strv.h b/strv.h
index 7a132ef687..acaae9e7ea 100644
--- a/strv.h
+++ b/strv.h
@@ -30,11 +30,25 @@ char **strv_copy(char **l);
unsigned strv_length(char **l);
char **strv_merge(char **a, char **b);
+char **strv_merge_concat(char **a, char **b, const char *suffix);
+char **strv_append(char **l, const char *s);
-bool strv_contains(char **l, const char *s);
+char **strv_remove(char **l, const char *s);
+char **strv_uniq(char **l);
+
+#define strv_contains(l, s) (!!strv_find((l), (s)))
char **strv_new(const char *x, ...) _sentinel;
+static inline bool strv_isempty(char **l) {
+ return !l || !*l;
+}
+
+char **strv_split(const char *s, const char *separator);
+char **strv_split_quoted(const char *s);
+
+char *strv_join(char **l, const char *separator);
+
#define STRV_FOREACH(s, l) \
for ((s) = (l); (s) && *(s); (s)++)