AK: Add is_ascii_c0_control_or_space

(cherry picked from commit cfa8a8cea25dfdc620ab1162ad853197014526ff)
This commit is contained in:
Shannon Booth 2024-08-06 01:49:30 +12:00 committed by Nico Weber
parent e1417b2da1
commit fbb1db21b9

View file

@ -100,6 +100,12 @@ constexpr bool is_ascii_c0_control(u32 code_point)
return code_point < 0x20;
}
// https://infra.spec.whatwg.org/#c0-control-or-space
constexpr bool is_ascii_c0_control_or_space(u32 code_point)
{
return code_point <= 0x20;
}
constexpr bool is_ascii_control(u32 code_point)
{
return is_ascii_c0_control(code_point) || code_point == 0x7F;
@ -190,6 +196,7 @@ using AK::is_ascii_base36_digit;
using AK::is_ascii_binary_digit;
using AK::is_ascii_blank;
using AK::is_ascii_c0_control;
using AK::is_ascii_c0_control_or_space;
using AK::is_ascii_control;
using AK::is_ascii_digit;
using AK::is_ascii_graphical;