mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +00:00
AK: Add is_any_of(StringView) to GenericLexer
This commit is contained in:
parent
861ce62e14
commit
441807f96d
Notes:
sideshowbarker
2024-07-19 02:57:26 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/441807f96df Pull-request: https://github.com/SerenityOS/serenity/pull/3368
1 changed files with 6 additions and 0 deletions
|
@ -75,6 +75,11 @@ protected:
|
|||
size_t m_index { 0 };
|
||||
};
|
||||
|
||||
constexpr auto is_any_of(const StringView& values)
|
||||
{
|
||||
return [values](auto c) { return values.contains(c); };
|
||||
}
|
||||
|
||||
// ctype adaptors
|
||||
// FIXME: maybe put them in an another file?
|
||||
bool is_alpha(char);
|
||||
|
@ -97,6 +102,7 @@ using AK::GenericLexer;
|
|||
|
||||
using AK::is_alpha;
|
||||
using AK::is_alphanum;
|
||||
using AK::is_any_of;
|
||||
using AK::is_control;
|
||||
using AK::is_digit;
|
||||
using AK::is_graphic;
|
||||
|
|
Loading…
Reference in a new issue