AK: Add a Utf16View::is_code_unit_less_than helper

This seems like the natural place to put this since it is specific
to UTF-16.
This commit is contained in:
Shannon Booth 2025-05-15 17:56:33 +12:00 committed by Tim Flynn
commit 5cf87dcfdc
Notes: github-actions[bot] 2025-05-17 12:02:09 +00:00
2 changed files with 17 additions and 0 deletions

View file

@ -135,6 +135,7 @@ public:
Utf16View unicode_substring_view(size_t code_point_offset) const { return unicode_substring_view(code_point_offset, length_in_code_points() - code_point_offset); }
bool starts_with(Utf16View const&) const;
bool is_code_unit_less_than(Utf16View const& other) const;
bool validate() const;
bool validate(size_t& valid_code_units) const;