mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 18:17:22 +02:00
AK+LibWeb: Add a UTF-16 starts/ends with wrapper for a single code unit
This commit is contained in:
committed by
Jelle Raaijmakers
parent
7082cafdbc
commit
1bc80848fb
Notes:
github-actions[bot]
2025-08-07 00:07:32 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/1bc80848fb8 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5746 Reviewed-by: https://github.com/gmta ✅
@@ -1615,7 +1615,7 @@ static bool is_valid_simple_color(Utf16View const& value)
|
||||
if (value.length_in_code_units() != 7)
|
||||
return false;
|
||||
// and the first character is a U+0023 NUMBER SIGN character (#),
|
||||
if (!value.starts_with("#"sv))
|
||||
if (!value.starts_with('#'))
|
||||
return false;
|
||||
// and the remaining six characters are all ASCII hex digits
|
||||
for (size_t i = 1; i < value.length_in_code_units(); i++)
|
||||
|
||||
Reference in New Issue
Block a user