mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 00:50:22 +00:00
AK: Add StringView::{begin,end} so we can range-for over StringViews
This commit is contained in:
parent
1fadde2483
commit
83ee76a53e
Notes:
sideshowbarker
2024-07-19 05:46:16 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/83ee76a53e3
1 changed files with 3 additions and 0 deletions
|
@ -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 };
|
||||
|
|
Loading…
Reference in a new issue