1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 02:28:12 +00:00

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

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)