strv: introduce strv_compare()
This commit is contained in:
+4
-1
@@ -51,7 +51,10 @@ char **strv_remove(char **l, const char *s);
|
||||
char **strv_uniq(char **l);
|
||||
bool strv_is_uniq(char * const *l);
|
||||
|
||||
bool strv_equal(char * const *a, char * const *b);
|
||||
int strv_compare(char * const *a, char * const *b);
|
||||
static inline bool strv_equal(char * const *a, char * const *b) {
|
||||
return strv_compare(a, b) == 0;
|
||||
}
|
||||
|
||||
#define strv_contains(l, s) (!!strv_find((l), (s)))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user