mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-23 01:32:14 -05:00
Kernel: Add a KString::bytes() helper
This commit is contained in:
parent
3098b11c07
commit
0e44bb7d82
Notes:
sideshowbarker
2024-07-17 21:00:57 +09:00
Author: https://github.com/IdanHo Commit: https://github.com/SerenityOS/serenity/commit/0e44bb7d82b Pull-request: https://github.com/SerenityOS/serenity/pull/11848 Reviewed-by: https://github.com/ADKaster Reviewed-by: https://github.com/bgianfo ✅
1 changed files with 1 additions and 0 deletions
|
@ -43,6 +43,7 @@ public:
|
|||
[[nodiscard]] size_t length() const { return m_length; }
|
||||
[[nodiscard]] char const* characters() const { return m_characters; }
|
||||
[[nodiscard]] StringView view() const { return { characters(), length() }; }
|
||||
[[nodiscard]] ReadonlyBytes bytes() const { return { characters(), length() }; }
|
||||
|
||||
private:
|
||||
explicit KString(size_t length)
|
||||
|
|
Loading…
Reference in a new issue