mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:07:36 +00:00
LibJS: Add PrimitiveString::is_empty() and use it
If we're only interested in whether the string is empty, we can skip the conversion from UTF-16 to UTF-8.
This commit is contained in:
parent
32480fbeb9
commit
f4c68eb0a4
3 changed files with 12 additions and 1 deletions
|
@ -24,6 +24,8 @@ public:
|
|||
PrimitiveString(PrimitiveString const&) = delete;
|
||||
PrimitiveString& operator=(PrimitiveString const&) = delete;
|
||||
|
||||
bool is_empty() const;
|
||||
|
||||
String const& string() const;
|
||||
bool has_utf8_string() const { return m_has_utf8_string; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue