Added containsIgnoreCase() as shortcut for findIgnoreCase() != end().
This commit is contained in:
parent
0e1964ba25
commit
5e71b0ff9e
@ -864,6 +864,12 @@ inline auto findIgnoreCase(std::string_view haystack, std::string_view needle)
|
|||||||
return std::ranges::search(haystack, needle, &compareIgnoreCase<char>);
|
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]]
|
[[nodiscard]]
|
||||||
inline bool startsWithIgnoreCase(std::string_view string, std::string_view part)
|
inline bool startsWithIgnoreCase(std::string_view string, std::string_view part)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user