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

LibJS: Port trivial use cases in the Intl namespace to String

This commit is contained in:
Timothy Flynn 2023-01-15 10:31:39 -05:00 committed by Linus Groh
parent edfdade9e9
commit fc413711ee
18 changed files with 72 additions and 70 deletions

View file

@ -58,12 +58,12 @@ ThrowCompletionOr<Value> CollatorCompareFunction::call()
// 4. If y is not provided, let y be undefined.
// 5. Let X be ? ToString(x).
auto x = TRY(vm.argument(0).to_deprecated_string(vm));
auto x = TRY(vm.argument(0).to_string(vm));
// 6. Let Y be ? ToString(y).
auto y = TRY(vm.argument(1).to_deprecated_string(vm));
auto y = TRY(vm.argument(1).to_string(vm));
// 7. Return CompareStrings(collator, X, Y).
return compare_strings(m_collator, Utf8View(x), Utf8View(y));
return compare_strings(m_collator, x.code_points(), y.code_points());
}
void CollatorCompareFunction::visit_edges(Visitor& visitor)