mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-30 14:20:21 +00:00
LibJS: Add and use PrimitiveString::length_in_utf16_code_units
I was investigating an optimization in this area, and while it didn't seem to have a noticable improvement, it still seems useful to apply this change.
This commit is contained in:
parent
560317b3d0
commit
e476d21ed0
Notes:
github-actions[bot]
2025-05-03 14:19:42 +00:00
Author: https://github.com/shannonbooth
Commit: e476d21ed0
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4571
5 changed files with 12 additions and 9 deletions
|
@ -45,6 +45,8 @@ public:
|
|||
[[nodiscard]] Utf16View utf16_string_view() const;
|
||||
bool has_utf16_string() const { return m_utf16_string.has_value(); }
|
||||
|
||||
size_t length_in_utf16_code_units() const;
|
||||
|
||||
ThrowCompletionOr<Optional<Value>> get(VM&, PropertyKey const&) const;
|
||||
|
||||
[[nodiscard]] bool operator==(PrimitiveString const&) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue