1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 10:57:34 +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:
Linus Groh 2022-12-04 18:02:33 +00:00 committed by Andreas Kling
parent f74251606d
commit 6e19ab2bbc
2006 changed files with 11635 additions and 11636 deletions

View file

@ -6,7 +6,7 @@
#pragma once
#include <AK/String.h>
#include <AK/DeprecatedString.h>
#include <AK/StringView.h>
#include <LibJS/Forward.h>
#include <LibJS/Heap/Cell.h>
@ -26,7 +26,7 @@ public:
bool is_empty() const;
String const& string() const;
DeprecatedString const& string() const;
bool has_utf8_string() const { return m_has_utf8_string; }
Utf16String const& utf16_string() const;
@ -37,7 +37,7 @@ public:
private:
explicit PrimitiveString(PrimitiveString&, PrimitiveString&);
explicit PrimitiveString(String);
explicit PrimitiveString(DeprecatedString);
explicit PrimitiveString(Utf16String);
virtual void visit_edges(Cell::Visitor&) override;
@ -51,7 +51,7 @@ private:
mutable PrimitiveString* m_lhs { nullptr };
mutable PrimitiveString* m_rhs { nullptr };
mutable String m_utf8_string;
mutable DeprecatedString m_utf8_string;
mutable Utf16String m_utf16_string;
};
@ -62,8 +62,8 @@ PrimitiveString* js_string(VM&, Utf16View const&);
PrimitiveString* js_string(Heap&, Utf16String);
PrimitiveString* js_string(VM&, Utf16String);
PrimitiveString* js_string(Heap&, String);
PrimitiveString* js_string(VM&, String);
PrimitiveString* js_string(Heap&, DeprecatedString);
PrimitiveString* js_string(VM&, DeprecatedString);
PrimitiveString* js_rope_string(VM&, PrimitiveString&, PrimitiveString&);