]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Add helper for case-independent string equality checks
authorMatthias Klumpp <matthias@tenstral.net>
Sat, 10 Oct 2020 02:40:23 +0000 (04:40 +0200)
committerMatthias Klumpp <matthias@tenstral.net>
Tue, 12 Jan 2021 21:53:53 +0000 (22:53 +0100)
src/basic/string-util.h

index 593cf04ae1d4fdec8455bca50cff25b178fe2716..3ff21e42a43548e717ec14e260f3eba0e9b71239 100644 (file)
@@ -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;