summaryrefslogtreecommitdiff
path: root/AK
diff options
context:
space:
mode:
Diffstat (limited to 'AK')
-rw-r--r--AK/GenericLexer.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/AK/GenericLexer.h b/AK/GenericLexer.h
index 4956da649c..4badf22d72 100644
--- a/AK/GenericLexer.h
+++ b/AK/GenericLexer.h
@@ -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;