mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-03-21 19:10:45 +01:00
shared: add nm_utf8_collate0() helper
Like g_utf8_collate(), which complains about NULL strings.
This commit is contained in:
parent
8d5febbb38
commit
bb649fc3cd
1 changed files with 10 additions and 0 deletions
|
|
@ -449,6 +449,16 @@ nm_g_variant_unref_floating (GVariant *var)
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
static inline int
|
||||
nm_utf8_collate0 (const char *a, const char *b)
|
||||
{
|
||||
if (!a)
|
||||
return !b ? 0 : -1;
|
||||
if (!b)
|
||||
return 1;
|
||||
return g_utf8_collate (a, b);
|
||||
}
|
||||
|
||||
int nm_strcmp_p_with_data (gconstpointer a, gconstpointer b, gpointer user_data);
|
||||
int nm_cmp_uint32_p_with_data (gconstpointer p_a, gconstpointer p_b, gpointer user_data);
|
||||
int nm_cmp_int2ptr_p_with_data (gconstpointer p_a, gconstpointer p_b, gpointer user_data);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue