1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 11:47:46 +00:00

LibJS: Add a convenience StringView accessor to PrimitiveString

This commit is contained in:
Timothy Flynn 2023-01-15 09:37:32 -05:00 committed by Linus Groh
parent 0a1874c203
commit 4235c59397
2 changed files with 9 additions and 5 deletions

View file

@ -37,6 +37,7 @@ public:
u32 hash() const;
ThrowCompletionOr<String> utf8_string() const;
ThrowCompletionOr<StringView> utf8_string_view() const;
bool has_utf8_string() const { return m_utf8_string.has_value(); }
ThrowCompletionOr<DeprecatedString> deprecated_string() const;