Kernel: Add a KString::bytes() helper

This commit is contained in:
Idan Horowitz 2022-01-13 00:36:33 +02:00 committed by Brian Gianforcaro
parent 3098b11c07
commit 0e44bb7d82
Notes: sideshowbarker 2024-07-17 21:00:57 +09:00

View file

@ -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)