mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:04:59 +00:00
AK: Add StringBuilder::to_fly_string()
This commit is contained in:
parent
a35fa553dd
commit
1453ac79e7
2 changed files with 7 additions and 0 deletions
|
@ -15,6 +15,7 @@
|
|||
|
||||
#ifndef KERNEL
|
||||
# include <AK/DeprecatedString.h>
|
||||
# include <AK/FlyString.h>
|
||||
# include <AK/Utf16View.h>
|
||||
#endif
|
||||
|
||||
|
@ -122,6 +123,11 @@ ErrorOr<String> StringBuilder::to_string() const
|
|||
{
|
||||
return String::from_utf8(string_view());
|
||||
}
|
||||
|
||||
ErrorOr<FlyString> StringBuilder::to_fly_string() const
|
||||
{
|
||||
return FlyString::from_utf8(string_view());
|
||||
}
|
||||
#endif
|
||||
|
||||
StringView StringBuilder::string_view() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue