AK+LibWeb: Add a UTF-16 starts/ends with wrapper for a single code unit

This commit is contained in:
Timothy Flynn 2025-08-06 07:43:11 -04:00 committed by Jelle Raaijmakers
parent 7082cafdbc
commit 1bc80848fb
Notes: github-actions[bot] 2025-08-07 00:07:32 +00:00
8 changed files with 26 additions and 9 deletions

View file

@ -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;
}