From 35962ed6b09ac995d663aeb7ab0287743cecc24c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 12:23:34 +0200 Subject: Merging upstream version 252.23. Signed-off-by: Daniel Baumann --- src/basic/string-util.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/basic/string-util.c') 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; +} -- cgit v1.2.3