summaryrefslogtreecommitdiff
path: root/strv.c
diff options
context:
space:
mode:
Diffstat (limited to 'strv.c')
-rw-r--r--strv.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/strv.c b/strv.c
index faa878c006..7e0810bffe 100644
--- a/strv.c
+++ b/strv.c
@@ -145,3 +145,13 @@ fail:
return NULL;
}
+
+bool strv_contains(char **l, const char *s) {
+ char **i;
+
+ STRV_FOREACH(i, l)
+ if (streq(*i, s))
+ return true;
+
+ return false;
+}