1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:37:35 +00:00

AK+LibJS+LibRegex: Define an alias for UTF-16 string data storage

Instead of writing out "Vector<u16, 1>" everywhere, let's have a name
for it.
This commit is contained in:
Timothy Flynn 2023-01-06 11:00:24 -05:00 committed by Linus Groh
parent 39bda0073e
commit 425c168ded
10 changed files with 37 additions and 34 deletions

View file

@ -1233,7 +1233,7 @@ ThrowCompletionOr<DeprecatedString> get_substitution(VM& vm, Utf16View const& ma
auto replace_string = TRY(replacement_template.to_utf16_string(vm));
auto replace_view = replace_string.view();
Vector<u16, 1> result;
Utf16Data result;
for (size_t i = 0; i < replace_view.length_in_code_units(); ++i) {
u16 curr = replace_view.code_unit_at(i);