diff options
Diffstat (limited to 'libbb/compare_string_array.c')
-rw-r--r-- | libbb/compare_string_array.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libbb/compare_string_array.c b/libbb/compare_string_array.c index 01a9df0e2..7ccdaef8a 100644 --- a/libbb/compare_string_array.c +++ b/libbb/compare_string_array.c | |||
@@ -27,6 +27,19 @@ char* FAST_FUNC is_prefixed_with(const char *string, const char *key) | |||
27 | #endif | 27 | #endif |
28 | } | 28 | } |
29 | 29 | ||
30 | #if ENABLE_PLATFORM_MINGW32 | ||
31 | char* FAST_FUNC is_prefixed_with_case(const char *string, const char *key) | ||
32 | { | ||
33 | while (*key != '\0') { | ||
34 | if (tolower(*key) != tolower(*string)) | ||
35 | return NULL; | ||
36 | key++; | ||
37 | string++; | ||
38 | } | ||
39 | return (char*)string; | ||
40 | } | ||
41 | #endif | ||
42 | |||
30 | /* | 43 | /* |
31 | * Return NULL if string is not suffixed with key. Return pointer to the | 44 | * Return NULL if string is not suffixed with key. Return pointer to the |
32 | * beginning of prefix key in string. If key is an empty string return pointer | 45 | * beginning of prefix key in string. If key is an empty string return pointer |