Added findIgnoreCase() utility function.
This commit is contained in:
parent
cd66b76a8f
commit
a64bfde6af
@ -387,6 +387,15 @@ constexpr bool isHexadecimalChar(TChar chr) noexcept
|
||||
|| (chr >= TChar('a') && chr <= TChar('f'));
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
inline auto findIgnoreCase(std::string_view haystack, std::string_view needle)
|
||||
{
|
||||
return std::ranges::search(haystack, needle, [](char left, char right)
|
||||
{
|
||||
return std::tolower(left) == std::tolower(right);
|
||||
});
|
||||
}
|
||||
|
||||
namespace pipe
|
||||
{
|
||||
struct Join
|
||||
|
Loading…
x
Reference in New Issue
Block a user