mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 19:47:46 +00:00
AK+Everywhere: Rename String to DeprecatedString
We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
This commit is contained in:
parent
f74251606d
commit
6e19ab2bbc
2006 changed files with 11635 additions and 11636 deletions
|
@ -6,8 +6,8 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/DeprecatedString.h>
|
||||
#include <AK/HashMap.h>
|
||||
#include <AK/String.h>
|
||||
#include <AK/StringView.h>
|
||||
#include <AK/Variant.h>
|
||||
#include <AK/Vector.h>
|
||||
|
@ -30,8 +30,8 @@ public:
|
|||
|
||||
virtual ~ListFormat() override = default;
|
||||
|
||||
String const& locale() const { return m_locale; }
|
||||
void set_locale(String locale) { m_locale = move(locale); }
|
||||
DeprecatedString const& locale() const { return m_locale; }
|
||||
void set_locale(DeprecatedString locale) { m_locale = move(locale); }
|
||||
|
||||
Type type() const { return m_type; }
|
||||
void set_type(StringView type);
|
||||
|
@ -44,7 +44,7 @@ public:
|
|||
private:
|
||||
explicit ListFormat(Object& prototype);
|
||||
|
||||
String m_locale; // [[Locale]]
|
||||
DeprecatedString m_locale; // [[Locale]]
|
||||
Type m_type { Type::Invalid }; // [[Type]]
|
||||
::Locale::Style m_style { ::Locale::Style::Long }; // [[Style]]
|
||||
};
|
||||
|
@ -52,9 +52,9 @@ private:
|
|||
using Placeables = HashMap<StringView, Variant<PatternPartition, Vector<PatternPartition>>>;
|
||||
|
||||
Vector<PatternPartition> deconstruct_pattern(StringView pattern, Placeables);
|
||||
Vector<PatternPartition> create_parts_from_list(ListFormat const&, Vector<String> const& list);
|
||||
String format_list(ListFormat const&, Vector<String> const& list);
|
||||
Array* format_list_to_parts(VM&, ListFormat const&, Vector<String> const& list);
|
||||
ThrowCompletionOr<Vector<String>> string_list_from_iterable(VM&, Value iterable);
|
||||
Vector<PatternPartition> create_parts_from_list(ListFormat const&, Vector<DeprecatedString> const& list);
|
||||
DeprecatedString format_list(ListFormat const&, Vector<DeprecatedString> const& list);
|
||||
Array* format_list_to_parts(VM&, ListFormat const&, Vector<DeprecatedString> const& list);
|
||||
ThrowCompletionOr<Vector<DeprecatedString>> string_list_from_iterable(VM&, Value iterable);
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue