diff --git a/AK/Utf32View.h b/AK/Utf32View.h index d210ec7eafc..cb3c5ae44de 100644 --- a/AK/Utf32View.h +++ b/AK/Utf32View.h @@ -83,6 +83,7 @@ public: const u32* code_points() const { return m_code_points; } bool is_empty() const { return m_length == 0; } + bool is_null() const { return !m_code_points; } size_t length() const { return m_length; } size_t iterator_offset(const Utf32CodePointIterator& it) const diff --git a/AK/Utf8View.h b/AK/Utf8View.h index e8afc590a60..5832c6c9fcf 100644 --- a/AK/Utf8View.h +++ b/AK/Utf8View.h @@ -74,6 +74,7 @@ public: Utf8View unicode_substring_view(size_t code_point_offset) const { return unicode_substring_view(code_point_offset, length() - code_point_offset); } bool is_empty() const { return m_string.is_empty(); } + bool is_null() const { return m_string.is_null(); } bool starts_with(const Utf8View&) const; bool contains(u32) const;