From 086877a280dd614a62d247dd2b3b58071c9afdda Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Wed, 27 Aug 2025 07:00:20 -0400 Subject: [PATCH] AK: Use simdutf to validate UTF-16 strings as ASCII --- AK/Utf16View.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/AK/Utf16View.cpp b/AK/Utf16View.cpp index cd1bee5e650..9ef15052b32 100644 --- a/AK/Utf16View.cpp +++ b/AK/Utf16View.cpp @@ -151,9 +151,7 @@ bool Utf16View::is_ascii() const { if (has_ascii_storage()) return true; - - // FIXME: Petition simdutf to implement an ASCII validator for UTF-16. - return all_of(utf16_span(), AK::is_ascii); + return simdutf::validate_utf16_as_ascii(m_string.utf16, length_in_code_units()); } bool Utf16View::validate() const