From 637ca28ce99b1b6f9c73b6bb480b90dc7f9ad973 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 (cherry picked from commit bd47b0dac4a1ff6e686c99b9958693e86d44007b) Gbp-Pq: Name Add-helper-for-case-independent-string-equality-checks.patch --- 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 fdd3ce73..6c99335b 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.30.2