mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-26 17:00:08 +01:00
glib-aux: add nm_strv_contains() helper
(cherry picked from commit ee0f3f6242)
This commit is contained in:
parent
65d31a11f8
commit
aed57e8acc
1 changed files with 2 additions and 0 deletions
|
|
@ -809,6 +809,8 @@ gssize _nm_strv_find_first(const char *const *list, gssize len, const char *need
|
|||
#define nm_strv_find_first(list, len, needle) \
|
||||
_nm_strv_find_first(NM_CAST_STRV_CC(list), (len), (needle))
|
||||
|
||||
#define nm_strv_contains(list, len, needle) (nm_strv_find_first((list), (len), (needle)) >= 0)
|
||||
|
||||
gboolean nm_strv_has_duplicate(const char *const *list, gssize len, gboolean is_sorted);
|
||||
|
||||
const char **nm_strv_cleanup_const(const char **strv, gboolean skip_empty, gboolean skip_repeated);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue