glib-aux: add nm_strvarray_contains() helper

This commit is contained in:
Thomas Haller 2023-10-26 13:26:43 +02:00
parent 9f9a89d778
commit 7ab9a2b69f
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -3112,6 +3112,8 @@ nm_strvarray_find_first(GArray *strv, const char *needle)
return -1;
}
#define nm_strvarray_contains(strv, needle) (nm_strvarray_find_first((strv), (needle)) >= 0)
static inline gboolean
nm_strvarray_remove_first(GArray *strv, const char *needle)
{