mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:38:11 +00:00
StringView: Make it easy to construct from a ByteBuffer.
This commit is contained in:
parent
53479f9356
commit
50677a58d4
2 changed files with 10 additions and 1 deletions
|
@ -10,6 +10,12 @@ StringView::StringView(const String& string)
|
|||
{
|
||||
}
|
||||
|
||||
StringView::StringView(const ByteBuffer& buffer)
|
||||
: m_characters((const char*)buffer.data())
|
||||
, m_length(buffer.size())
|
||||
{
|
||||
}
|
||||
|
||||
Vector<StringView> StringView::split_view(const char separator) const
|
||||
{
|
||||
if (is_empty())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue