mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:07:36 +00:00
AK: Add StringView(ReadonlyBytes) constructor.
This commit is contained in:
parent
b1fc8d2b38
commit
ebce4ead40
1 changed files with 5 additions and 0 deletions
|
@ -57,6 +57,11 @@ public:
|
||||||
, m_length(cstring ? __builtin_strlen(cstring) : 0)
|
, m_length(cstring ? __builtin_strlen(cstring) : 0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
ALWAYS_INLINE StringView(ReadonlyBytes bytes)
|
||||||
|
: m_characters(reinterpret_cast<const char*>(bytes.data()))
|
||||||
|
, m_length(bytes.size())
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
StringView(const ByteBuffer&);
|
StringView(const ByteBuffer&);
|
||||||
StringView(const String&);
|
StringView(const String&);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue