mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-23 09:22:30 +00:00
LibJS+LibWeb: Replace JS::Utf16String with AK::Utf16String
This commit is contained in:
parent
d40e3af697
commit
a43cb15e81
Notes:
github-actions[bot]
2025-07-18 16:46:59 +00:00
Author: https://github.com/trflynn89
Commit: a43cb15e81
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5388
Reviewed-by: https://github.com/shannonbooth ✅
24 changed files with 172 additions and 526 deletions
|
@ -7,8 +7,8 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/Optional.h>
|
||||
#include <AK/Utf16String.h>
|
||||
#include <LibJS/Forward.h>
|
||||
#include <LibJS/Runtime/Utf16String.h>
|
||||
|
||||
namespace JS {
|
||||
|
||||
|
@ -26,20 +26,20 @@ public:
|
|||
Optional<Utf16String> const& last_match() const
|
||||
{
|
||||
if (!m_last_match_string.has_value())
|
||||
m_last_match_string = Utf16String::create(m_last_match);
|
||||
m_last_match_string = Utf16String::from_utf16_without_validation(m_last_match);
|
||||
return m_last_match_string;
|
||||
}
|
||||
Optional<Utf16String> const& last_paren() const { return m_last_paren; }
|
||||
Optional<Utf16String> const& left_context() const
|
||||
{
|
||||
if (!m_left_context_string.has_value())
|
||||
m_left_context_string = Utf16String::create(m_left_context);
|
||||
m_left_context_string = Utf16String::from_utf16_without_validation(m_left_context);
|
||||
return m_left_context_string;
|
||||
}
|
||||
Optional<Utf16String> const& right_context() const
|
||||
{
|
||||
if (!m_right_context_string.has_value())
|
||||
m_right_context_string = Utf16String::create(m_right_context);
|
||||
m_right_context_string = Utf16String::from_utf16_without_validation(m_right_context);
|
||||
return m_right_context_string;
|
||||
}
|
||||
Optional<Utf16String> const& $1() const { return m_$1; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue