From bd47b0dac4a1ff6e686c99b9958693e86d44007b Mon Sep 17 00:00:00 2001 From: Matthias Klumpp Date: Sat, 10 Oct 2020 04:40:23 +0200 Subject: [PATCH] Add helper for case-independent string equality checks --- src/basic/string-util.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/basic/string-util.h b/src/basic/string-util.h index 593cf04ae1d..3ff21e42a43 100644 --- a/src/basic/string-util.h +++ b/src/basic/string-util.h @@ -33,6 +33,10 @@ static inline bool streq_ptr(const char *a, const char *b) { return strcmp_ptr(a, b) == 0; } +static inline bool strcaseeq_ptr(const char *a, const char *b) { + return strcasecmp_ptr(a, b) == 0; +} + static inline char* strstr_ptr(const char *haystack, const char *needle) { if (!haystack || !needle) return NULL; -- 2.47.3