diff options
author | Matthias Klumpp <matthias@tenstral.net> | 2020-10-10 04:40:23 +0200 |
---|---|---|
committer | Matthias Klumpp <matthias@tenstral.net> | 2021-01-12 22:53:53 +0100 |
commit | bd47b0dac4a1ff6e686c99b9958693e86d44007b (patch) | |
tree | ed4301c6eaa3ebbce7837b908d58c3baa5b1063a /src/basic | |
parent | 537ae584c80fa16d585c5e7b909331807d725fbf (diff) | |
download | systemd-bd47b0dac4a1ff6e686c99b9958693e86d44007b.tar.gz |
Add helper for case-independent string equality checks
Diffstat (limited to 'src/basic')
-rw-r--r-- | src/basic/string-util.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/basic/string-util.h b/src/basic/string-util.h index 593cf04ae1..3ff21e42a4 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; |