summaryrefslogtreecommitdiffstats
path: root/src/shared/strv.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/strv.c')
-rw-r--r--src/shared/strv.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/shared/strv.c b/src/shared/strv.c
index e418312d52..2268bf61db 100644
--- a/src/shared/strv.c
+++ b/src/shared/strv.c
@@ -692,3 +692,13 @@ char **strv_reverse(char **l) {
return l;
}
+
+bool strv_fnmatch(const char *s, char* const* patterns, int flags) {
+ char* const* p;
+
+ STRV_FOREACH(p, patterns)
+ if (fnmatch(*p, s, 0) == 0)
+ return true;
+
+ return false;
+}