Added containsIgnoreCase() as shortcut for findIgnoreCase() != end().
This commit is contained in:
@@ -864,6 +864,12 @@ inline auto findIgnoreCase(std::string_view haystack, std::string_view needle)
|
||||
return std::ranges::search(haystack, needle, &compareIgnoreCase<char>);
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
inline bool containsIgnoreCase(std::string_view haystack, std::string_view needle)
|
||||
{
|
||||
return findIgnoreCase(haystack, needle).begin() != haystack.end();
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
inline bool startsWithIgnoreCase(std::string_view string, std::string_view part)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user