diff options
author | Alexander Larsson <alexl@redhat.com> | 2009-06-23 21:10:31 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2009-06-23 21:10:31 +0200 |
commit | c7b6875c98ecd25dc26853b783e1a4ffe96fab36 (patch) | |
tree | 62966845c81129564a568a3779986be79f5df2da /eel/eel-glib-extensions.c | |
parent | ffc93d52d4650e63e01b488ef582983919c89de3 (diff) | |
download | nautilus-c7b6875c98ecd25dc26853b783e1a4ffe96fab36.tar.gz |
Add eel_g_strv_equal
Diffstat (limited to 'eel/eel-glib-extensions.c')
-rw-r--r-- | eel/eel-glib-extensions.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/eel/eel-glib-extensions.c b/eel/eel-glib-extensions.c index 5152d9591..d36d14d2e 100644 --- a/eel/eel-glib-extensions.c +++ b/eel/eel-glib-extensions.c @@ -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) { |