diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 10:23:34 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 10:23:34 +0000 |
commit | 35962ed6b09ac995d663aeb7ab0287743cecc24c (patch) | |
tree | 24a36570c53b15b3bd6e955054f8c4846db0e262 /src/basic/string-util.c | |
parent | Adding debian version 252.22-1~deb12u1. (diff) | |
download | systemd-35962ed6b09ac995d663aeb7ab0287743cecc24c.tar.xz systemd-35962ed6b09ac995d663aeb7ab0287743cecc24c.zip |
Merging upstream version 252.23.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/basic/string-util.c')
-rw-r--r-- | src/basic/string-util.c | 12 |
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; +} |