mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 08:04:57 +00:00
AK: Add support for the new FlyString to StringView
This commit is contained in:
parent
b61f8cd130
commit
e96c64cdb4
2 changed files with 10 additions and 1 deletions
|
@ -15,6 +15,7 @@
|
|||
#ifndef KERNEL
|
||||
# include <AK/DeprecatedFlyString.h>
|
||||
# include <AK/DeprecatedString.h>
|
||||
# include <AK/FlyString.h>
|
||||
# include <AK/String.h>
|
||||
#endif
|
||||
|
||||
|
@ -27,6 +28,12 @@ StringView::StringView(String const& string)
|
|||
{
|
||||
}
|
||||
|
||||
StringView::StringView(FlyString const& string)
|
||||
: m_characters(reinterpret_cast<char const*>(string.bytes().data()))
|
||||
, m_length(string.bytes().size())
|
||||
{
|
||||
}
|
||||
|
||||
StringView::StringView(DeprecatedString const& string)
|
||||
: m_characters(string.characters())
|
||||
, m_length(string.length())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue