Commit c7b6875c authored by Alexander Larsson's avatar Alexander Larsson

Add eel_g_strv_equal

parent ffc93d52
......@@ -437,6 +437,23 @@ eel_g_strv_find (char **strv, const char *find_me)
return -1;
}
gboolean
eel_g_strv_equal (char **a, char **b)
{
int i;
if (g_strv_length (a) != g_strv_length (b)) {
return FALSE;
}
for (i = 0; a[i] != NULL; i++) {
if (strcmp (a[i], b[i]) != 0) {
return FALSE;
}
}
return TRUE;
}
static int
compare_pointers (gconstpointer pointer_1, gconstpointer pointer_2)
{
......
......@@ -101,6 +101,8 @@ void eel_g_hash_table_safe_for_each (GHashTable *
/* NULL terminated string arrays (strv). */
int eel_g_strv_find (char **strv,
const char *find_me);
gboolean eel_g_strv_equal (char **a,
char **b);
/* return the time in microseconds since the machine was started */
gint64 eel_get_system_time (void);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment