mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-24 08:59:50 +00:00
AK: Allow comparing UTF-16 strings to UTF-8 strings
Before now, you could compare a Utf16View to a StringView, but it would only be valid if the StringView were ASCII. When porting code to UTF-16, it will be handy to have a code point-aware implementation for non-ASCII StringViews.
This commit is contained in:
parent
319e7aa03b
commit
0bf565b97f
Notes:
github-actions[bot]
2025-08-05 11:08:55 +00:00
Author: https://github.com/trflynn89
Commit: 0bf565b97f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5698
3 changed files with 35 additions and 2 deletions
|
|
@ -1070,7 +1070,7 @@ TEST_CASE(equals_ascii)
|
|||
test("ababababab"sv, "😀😀😀😀😀"_utf16);
|
||||
|
||||
// Non-ASCII string comparison.
|
||||
EXPECT_NE("😀"sv, "😀"_utf16);
|
||||
EXPECT_EQ("😀"sv, "😀"_utf16);
|
||||
}
|
||||
|
||||
TEST_CASE(equals_ignoring_ascii_case)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue