string-util: move startswith_strv to strv
This commit is contained in:
@@ -1420,18 +1420,6 @@ char *find_line_startswith(const char *haystack, const char *needle) {
|
||||
return p + strlen(needle);
|
||||
}
|
||||
|
||||
char *startswith_strv(const char *string, char **strv) {
|
||||
char *found = NULL;
|
||||
|
||||
STRV_FOREACH(i, strv) {
|
||||
found = startswith(string, *i);
|
||||
if (found)
|
||||
break;
|
||||
}
|
||||
|
||||
return found;
|
||||
}
|
||||
|
||||
bool version_is_valid(const char *s) {
|
||||
if (isempty(s))
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user