1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:17:44 +00:00

LibRegex: Make ^ and $ accept all LineTerminators instead of just '\n'

Also adds a couple tests.
This commit is contained in:
Ali Mohammad Pur 2023-03-25 16:36:05 +03:30 committed by Andreas Kling
parent 59a76b1279
commit 6fc9f5fa28
3 changed files with 13 additions and 8 deletions

View file

@ -116,7 +116,7 @@ public:
void reset_flag(T flag) { m_flags = (T)((FlagsUnderlyingType)m_flags & ~(FlagsUnderlyingType)flag); }
void set_flag(T flag) { *this |= flag; }
bool has_flag_set(T flag) const { return (FlagsUnderlyingType)flag == ((FlagsUnderlyingType)m_flags & (FlagsUnderlyingType)flag); }
T value() const { return m_flags; }
constexpr T value() const { return m_flags; }
private:
T m_flags { T::Default };