diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2016-07-23 17:48:15 +0900 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-07-24 09:53:24 +0900 |
commit | dcf94bef56d93a99649d0cc8ea106b1d0cc3fc7c (patch) | |
tree | 9ee3a540c3218ad89ea47734a83ce87f243c28e6 /core/dive.h | |
parent | 70e1938aa770b99c8c0de2122787a28145da97cb (diff) | |
download | subsurface-dcf94bef56d93a99649d0cc8ea106b1d0cc3fc7c.tar.gz |
Add new helper for case insensitive string comparison
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/dive.h')
-rw-r--r-- | core/dive.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/dive.h b/core/dive.h index eaca66626..ae980947a 100644 --- a/core/dive.h +++ b/core/dive.h @@ -30,6 +30,11 @@ static inline int same_string(const char *a, const char *b) return !strcmp(a ?: "", b ?: ""); } +static inline int same_string_caseinsensitive(const char *a, const char *b) +{ + return !strcasecmp(a ?: "", b ?: ""); +} + static inline char *copy_string(const char *s) { return (s && *s) ? strdup(s) : NULL; |