AK: Add StringView::{begin,end} so we can range-for over StringViews

This commit is contained in:
Andreas Kling 2020-06-07 20:53:30 +02:00
parent 1fadde2483
commit 83ee76a53e
Notes: sideshowbarker 2024-07-19 05:46:16 +09:00

View file

@ -156,6 +156,9 @@ public:
String to_string() const;
const char* begin() { return m_characters; }
const char* end() { return m_characters + m_length; }
private:
friend class String;
const StringImpl* m_impl { nullptr };