mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-26 10:49:29 +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
|
@ -1284,7 +1284,7 @@ ThrowCompletionOr<String> get_substitution(VM& vm, Utf16View const& matched, Utf
|
|||
|
||||
// 4. Let templateRemainder be replacementTemplate.
|
||||
auto replace_template_string = TRY(replacement_template.to_utf16_string(vm));
|
||||
auto template_remainder = replace_template_string.view();
|
||||
Utf16View template_remainder { replace_template_string };
|
||||
|
||||
// 5. Repeat, while templateRemainder is not the empty String,
|
||||
while (!template_remainder.is_empty()) {
|
||||
|
@ -1387,7 +1387,7 @@ ThrowCompletionOr<String> get_substitution(VM& vm, Utf16View const& matched, Utf
|
|||
else {
|
||||
// a. Let refReplacement be capture.
|
||||
capture_string = TRY(capture.to_utf16_string(vm));
|
||||
ref_replacement = capture_string->view();
|
||||
ref_replacement = *capture_string;
|
||||
}
|
||||
}
|
||||
// ix. Else,
|
||||
|
@ -1434,7 +1434,7 @@ ThrowCompletionOr<String> get_substitution(VM& vm, Utf16View const& matched, Utf
|
|||
else {
|
||||
// a. Let refReplacement be ? ToString(capture).
|
||||
capture_string = TRY(capture.to_utf16_string(vm));
|
||||
ref_replacement = capture_string->view();
|
||||
ref_replacement = *capture_string;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue