diff --git a/src/openrct2-ui/windows/GuestList.cpp b/src/openrct2-ui/windows/GuestList.cpp index 5939f1a4e8..83e9b721cd 100644 --- a/src/openrct2-ui/windows/GuestList.cpp +++ b/src/openrct2-ui/windows/GuestList.cpp @@ -785,7 +785,7 @@ private: Formatter ft; peep.FormatNameTo(ft); format_string(name, sizeof(name), STR_STRINGID, ft.Data()); - if (strcasestr(name, _filterName.c_str()) == nullptr) + if (!String::Contains(name, _filterName.c_str(), true)) { return false; } diff --git a/src/openrct2/util/Util.cpp b/src/openrct2/util/Util.cpp index b7da6dc90c..b7c26ba2c4 100644 --- a/src/openrct2/util/Util.cpp +++ b/src/openrct2/util/Util.cpp @@ -336,45 +336,6 @@ char* safe_strcat(char* destination, const char* source, size_t size) return result; } -#if defined(_WIN32) -char* strcasestr(const char* haystack, const char* needle) -{ - const char* p1 = haystack; - const char* p2 = needle; - const char* r = *p2 == 0 ? haystack : nullptr; - - while (*p1 != 0 && *p2 != 0) - { - if (tolower(static_cast(*p1)) == tolower(static_cast(*p2))) - { - if (r == nullptr) - r = p1; - p2++; - } - else - { - p2 = needle; - if (r != nullptr) - p1 = r + 1; - - if (tolower(static_cast(*p1)) == tolower(static_cast(*p2))) - { - r = p1; - p2++; - } - else - { - r = nullptr; - } - } - - p1++; - } - - return *p2 == 0 ? const_cast(r) : nullptr; -} -#endif - bool str_is_null_or_empty(const char* str) { return str == nullptr || str[0] == 0; diff --git a/src/openrct2/util/Util.h b/src/openrct2/util/Util.h index e043e4728c..6bacfaf440 100644 --- a/src/openrct2/util/Util.h +++ b/src/openrct2/util/Util.h @@ -33,9 +33,6 @@ int32_t bitcount(uint32_t source); int32_t strlogicalcmp(char const* a, char const* b); char* safe_strcpy(char* destination, const char* source, size_t num); char* safe_strcat(char* destination, const char* source, size_t size); -#if defined(_WIN32) -char* strcasestr(const char* haystack, const char* needle); -#endif bool str_is_null_or_empty(const char* str);