mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:27:34 +00:00
LibJS: Port trivial use cases in the Intl namespace to String
This commit is contained in:
parent
edfdade9e9
commit
fc413711ee
18 changed files with 72 additions and 70 deletions
|
@ -81,7 +81,7 @@ ThrowCompletionOr<NonnullGCPtr<Object>> SegmenterConstructor::construct(Function
|
|||
auto granularity = TRY(get_option(vm, *options, vm.names.granularity, OptionType::String, { "grapheme"sv, "word"sv, "sentence"sv }, "grapheme"sv));
|
||||
|
||||
// 13. Set segmenter.[[SegmenterGranularity]] to granularity.
|
||||
segmenter->set_segmenter_granularity(TRY(granularity.as_string().deprecated_string()));
|
||||
segmenter->set_segmenter_granularity(TRY(granularity.as_string().utf8_string_view()));
|
||||
|
||||
// 14. Return segmenter.
|
||||
return segmenter;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue