mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
AK+LibWeb: Add a UTF-16 starts/ends with wrapper for a single code unit
This commit is contained in:
parent
7082cafdbc
commit
1bc80848fb
Notes:
github-actions[bot]
2025-08-07 00:07:32 +00:00
Author: https://github.com/trflynn89
Commit: 1bc80848fb
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5746
Reviewed-by: https://github.com/gmta ✅
8 changed files with 26 additions and 9 deletions
|
|
@ -96,7 +96,7 @@ Utf16String strip_and_collapse_whitespace(Utf16String const& string)
|
|||
|
||||
for (auto code_point : string) {
|
||||
if (Infra::is_ascii_whitespace(code_point)) {
|
||||
if (!builder.utf16_string_view().ends_with(" "sv))
|
||||
if (!builder.utf16_string_view().ends_with(' '))
|
||||
builder.append(' ');
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue