AK: Add is_any_of(StringView) to GenericLexer

This commit is contained in:
AnotherTest 2020-08-31 19:24:27 +04:30 committed by Andreas Kling
parent 861ce62e14
commit 441807f96d
Notes: sideshowbarker 2024-07-19 02:57:26 +09:00

View file

@ -75,6 +75,11 @@ protected:
size_t m_index { 0 }; size_t m_index { 0 };
}; };
constexpr auto is_any_of(const StringView& values)
{
return [values](auto c) { return values.contains(c); };
}
// ctype adaptors // ctype adaptors
// FIXME: maybe put them in an another file? // FIXME: maybe put them in an another file?
bool is_alpha(char); bool is_alpha(char);
@ -97,6 +102,7 @@ using AK::GenericLexer;
using AK::is_alpha; using AK::is_alpha;
using AK::is_alphanum; using AK::is_alphanum;
using AK::is_any_of;
using AK::is_control; using AK::is_control;
using AK::is_digit; using AK::is_digit;
using AK::is_graphic; using AK::is_graphic;