mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-22 09:18:55 +00:00
AK: Use simdutf to validate UTF-16 strings as ASCII
This commit is contained in:
parent
6634100914
commit
086877a280
Notes:
github-actions[bot]
2025-08-27 11:26:09 +00:00
Author: https://github.com/trflynn89
Commit: 086877a280
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6001
Reviewed-by: https://github.com/gmta ✅
1 changed files with 1 additions and 3 deletions
|
@ -151,9 +151,7 @@ bool Utf16View::is_ascii() const
|
||||||
{
|
{
|
||||||
if (has_ascii_storage())
|
if (has_ascii_storage())
|
||||||
return true;
|
return true;
|
||||||
|
return simdutf::validate_utf16_as_ascii(m_string.utf16, length_in_code_units());
|
||||||
// FIXME: Petition simdutf to implement an ASCII validator for UTF-16.
|
|
||||||
return all_of(utf16_span(), AK::is_ascii);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Utf16View::validate() const
|
bool Utf16View::validate() const
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue