strv: add new macro STARTSWITH_SET()
authorLennart Poettering <lennart@poettering.net>
Fri, 23 Nov 2018 15:27:15 +0000 (16:27 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 26 Nov 2018 13:06:01 +0000 (14:06 +0100)
commit52f1552073047195d51901f7e5a5a4fa3189034e
treef49a11b7b2dc534829c483e48b95809efd86b04e
parentd7b659ef01a5fefcc959bca13e63f87c9fe315a1
strv: add new macro STARTSWITH_SET()

This is to startswith() what PATH_STARTSWITH_SET() is to
path_startswith().

Or in other words, checks if the specified string has any of the listed
prefixes, and if so, returns the remainder of the string.
src/basic/strv.h
src/test/test-strv.c