mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-11 10:41:30 +00:00
AK: Make Utf8View constructors inline and remove C string constructor
Using StringView instead of C strings is basically always preferable. The only reason to use a C string is because you are calling a C API.
This commit is contained in:
parent
291dbff2e1
commit
1be4cbd639
Notes:
sideshowbarker
2024-07-18 03:43:17 +09:00
Author: https://github.com/awesomekling
Commit: 1be4cbd639
9 changed files with 36 additions and 42 deletions
|
@ -256,7 +256,7 @@ TEST_CASE(char_utf8)
|
|||
Regex<PosixExtended> re("😀");
|
||||
RegexResult result;
|
||||
|
||||
EXPECT_EQ((result = match(Utf8View { "Привет, мир! 😀 γειά σου κόσμος 😀 こんにちは世界" }, re, PosixFlags::Global)).success, true);
|
||||
EXPECT_EQ((result = match(Utf8View { "Привет, мир! 😀 γειά σου κόσμος 😀 こんにちは世界"sv }, re, PosixFlags::Global)).success, true);
|
||||
EXPECT_EQ(result.count, 2u);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue