diff options
Diffstat (limited to 'src/shared/strv.c')
-rw-r--r-- | src/shared/strv.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/shared/strv.c b/src/shared/strv.c index aeb93eac6b..a5f8a2aff6 100644 --- a/src/shared/strv.c +++ b/src/shared/strv.c @@ -587,6 +587,17 @@ char **strv_sort(char **l) { return l; } +bool strv_equal(char **a, char **b) { + if (!a || !b) + return a == b; + + for ( ; *a || *b; ++a, ++b) + if (!streq_ptr(*a, *b)) + return false; + + return true; +} + void strv_print(char **l) { char **s; |