mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 23:37:36 +00:00
LibJS: Port Intl locale resolution to String
This commit is contained in:
parent
2f1184ccdb
commit
bb4b6d8ce3
20 changed files with 208 additions and 205 deletions
|
@ -6,7 +6,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/DeprecatedString.h>
|
||||
#include <AK/String.h>
|
||||
#include <LibJS/Runtime/Object.h>
|
||||
|
||||
namespace JS::Intl {
|
||||
|
@ -23,8 +23,8 @@ public:
|
|||
|
||||
virtual ~Segmenter() override = default;
|
||||
|
||||
DeprecatedString const& locale() const { return m_locale; }
|
||||
void set_locale(DeprecatedString locale) { m_locale = move(locale); }
|
||||
String const& locale() const { return m_locale; }
|
||||
void set_locale(String locale) { m_locale = move(locale); }
|
||||
|
||||
SegmenterGranularity segmenter_granularity() const { return m_segmenter_granularity; }
|
||||
void set_segmenter_granularity(StringView);
|
||||
|
@ -33,7 +33,7 @@ public:
|
|||
private:
|
||||
explicit Segmenter(Object& prototype);
|
||||
|
||||
DeprecatedString m_locale; // [[Locale]]
|
||||
String m_locale; // [[Locale]]
|
||||
SegmenterGranularity m_segmenter_granularity { SegmenterGranularity::Grapheme }; // [[SegmenterGranularity]]
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue