summaryrefslogtreecommitdiffstats
path: root/src/basic/string-util.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/basic/string-util.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/basic/string-util.c b/src/basic/string-util.c
index 17d35fe..8a806e9 100644
--- a/src/basic/string-util.c
+++ b/src/basic/string-util.c
@@ -1202,3 +1202,15 @@ size_t strspn_from_end(const char *str, const char *accept) {
return n;
}
+
+char *startswith_strv(const char *string, char **strv) {
+ char *found = NULL;
+
+ STRV_FOREACH(i, strv) {
+ found = startswith(string, *i);
+ if (found)
+ break;
+ }
+
+ return found;
+}