Add helper for case-independent string equality checks

This commit is contained in:
Matthias Klumpp
2020-10-10 04:40:23 +02:00
parent 537ae584c8
commit bd47b0dac4

View 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;