mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-03-05 04:10:36 +01:00
glib-aux: add nm_strv_contains() helper
(cherry picked from commitee0f3f6242) (cherry picked from commitaed57e8acc) (cherry picked from commit8af7c07585)
This commit is contained in:
parent
5afe0a2b51
commit
73d1d36912
1 changed files with 2 additions and 0 deletions
|
|
@ -771,6 +771,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