Fixed stars- and endsWithIgnoreCase.

This commit is contained in:
Patrick Wuttke
2025-03-27 15:07:17 +01:00
parent b007768790
commit 8bad5e4346

View File

@@ -402,7 +402,7 @@ inline auto findIgnoreCase(std::string_view haystack, std::string_view needle)
[[nodiscard]] [[nodiscard]]
inline bool startsWithIgnoreCase(std::string_view string, std::string_view part) inline bool startsWithIgnoreCase(std::string_view string, std::string_view part)
{ {
if (part.size() > part.size()) if (part.size() > string.size())
{ {
return false; return false;
} }
@@ -412,7 +412,7 @@ inline bool startsWithIgnoreCase(std::string_view string, std::string_view part)
[[nodiscard]] [[nodiscard]]
inline bool endsWithIgnoreCase(std::string_view string, std::string_view part) inline bool endsWithIgnoreCase(std::string_view string, std::string_view part)
{ {
if (part.size() > part.size()) if (part.size() > string.size())
{ {
return false; return false;
} }