diff options
-rw-r--r-- | XUtils.c | 4 | ||||
-rw-r--r-- | XUtils.h | 5 |
2 files changed, 5 insertions, 4 deletions
@@ -78,6 +78,10 @@ void* xReallocArray(void* ptr, size_t nmemb, size_t size) { return xRealloc(ptr, nmemb * size); } +inline bool String_contains_i(const char* s1, const char* s2) { + return strcasestr(s1, s2) != NULL; +} + char* String_cat(const char* s1, const char* s2) { const size_t l1 = strlen(s1); const size_t l2 = strlen(s2); @@ -13,7 +13,6 @@ in the source distribution for its full text. #include <stdio.h> #include <stdlib.h> // IWYU pragma: keep #include <string.h> // IWYU pragma: keep -#include <sys/types.h> #include "Compat.h" #include "Macros.h" @@ -39,9 +38,7 @@ static inline bool String_startsWith(const char* s, const char* match) { return strncmp(s, match, strlen(match)) == 0; } -static inline bool String_contains_i(const char* s1, const char* s2) { - return strcasestr(s1, s2) != NULL; -} +bool String_contains_i(const char* s1, const char* s2); static inline bool String_eq(const char* s1, const char* s2) { return strcmp(s1, s2) == 0; |