mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 19:37:36 +00:00
AK: Add StringView::{begin,end} so we can range-for over StringViews
This commit is contained in:
parent
1fadde2483
commit
83ee76a53e
1 changed files with 3 additions and 0 deletions
|
@ -156,6 +156,9 @@ public:
|
||||||
|
|
||||||
String to_string() const;
|
String to_string() const;
|
||||||
|
|
||||||
|
const char* begin() { return m_characters; }
|
||||||
|
const char* end() { return m_characters + m_length; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class String;
|
friend class String;
|
||||||
const StringImpl* m_impl { nullptr };
|
const StringImpl* m_impl { nullptr };
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue