diff options
author | Timothy Flynn <trflynn89@pm.me> | 2021-07-21 16:38:12 -0400 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-07-23 23:06:57 +0100 |
commit | 0e6375558dc60811a390ee014d76486ff28d8746 (patch) | |
tree | 6d2db1dfd5a585b39e750ddfbe8cce37f219697f /Userland/Libraries/LibRegex/RegexMatch.h | |
parent | 47f6bb38a1bd3c39324d11b4eec1d8d8993658a2 (diff) | |
download | serenity-0e6375558dc60811a390ee014d76486ff28d8746.zip |
AK+LibRegex: Partially implement case insensitive UTF-16 comparison
This will work for ASCII code points. Unicode case folding will be
needed for non-ASCII.
Diffstat (limited to 'Userland/Libraries/LibRegex/RegexMatch.h')
-rw-r--r-- | Userland/Libraries/LibRegex/RegexMatch.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Userland/Libraries/LibRegex/RegexMatch.h b/Userland/Libraries/LibRegex/RegexMatch.h index 6bc58ad78f..4ed5cab2f0 100644 --- a/Userland/Libraries/LibRegex/RegexMatch.h +++ b/Userland/Libraries/LibRegex/RegexMatch.h @@ -335,6 +335,11 @@ public: [&](StringView other_view) { return view.equals_ignoring_case(other_view); }, [](auto&) -> bool { TODO(); }); }, + [&](Utf16View view) { + return other.m_view.visit( + [&](Utf16View other_view) { return view.equals_ignoring_case(other_view); }, + [](auto&) -> bool { TODO(); }); + }, [](auto&) -> bool { TODO(); }); } |