mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-06 16:19:40 +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
|
@ -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++)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue