mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 08:44:58 +00:00
AK: Add StringView(String const&) constructor
This allows us to pass the new String type to functions that take a StringView directly, having to call bytes_as_string_view() every time gets old quickly.
This commit is contained in:
parent
daec065fde
commit
f23b55ae86
2 changed files with 9 additions and 0 deletions
|
@ -42,12 +42,14 @@ public:
|
|||
|
||||
StringView(ByteBuffer const&);
|
||||
#ifndef KERNEL
|
||||
StringView(String const&);
|
||||
StringView(DeprecatedString const&);
|
||||
StringView(FlyString const&);
|
||||
#endif
|
||||
|
||||
explicit StringView(ByteBuffer&&) = delete;
|
||||
#ifndef KERNEL
|
||||
explicit StringView(String&&) = delete;
|
||||
explicit StringView(DeprecatedString&&) = delete;
|
||||
explicit StringView(FlyString&&) = delete;
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue