mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 19:57:44 +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/GenericLexer.h>
|
||||
#include <AK/String.h>
|
||||
#include <AK/StringView.h>
|
||||
#include <AK/Types.h>
|
||||
#include <AK/Vector.h>
|
||||
|
@ -31,8 +31,8 @@ ParserBehavior operator&(ParserBehavior left, ParserBehavior right);
|
|||
ParserBehavior operator|(ParserBehavior left, ParserBehavior right);
|
||||
|
||||
struct ParserTraits {
|
||||
String separator;
|
||||
String quote { "\"" };
|
||||
DeprecatedString separator;
|
||||
DeprecatedString quote { "\"" };
|
||||
enum QuoteEscape {
|
||||
Repeat,
|
||||
Backslash,
|
||||
|
@ -73,7 +73,7 @@ public:
|
|||
void parse();
|
||||
bool has_error() const { return m_error != ReadError::None; }
|
||||
ReadError error() const { return m_error; }
|
||||
String error_string() const
|
||||
DeprecatedString error_string() const
|
||||
{
|
||||
switch (m_error) {
|
||||
#define E(x, y) \
|
||||
|
@ -87,7 +87,7 @@ public:
|
|||
}
|
||||
|
||||
size_t size() const { return m_rows.size(); }
|
||||
Vector<String> headers() const;
|
||||
Vector<DeprecatedString> headers() const;
|
||||
[[nodiscard]] bool has_explicit_headers() const { return (static_cast<u32>(m_behaviors) & static_cast<u32>(ParserBehavior::ReadHeaders)) != 0; }
|
||||
|
||||
class Row {
|
||||
|
@ -185,7 +185,7 @@ public:
|
|||
private:
|
||||
struct Field {
|
||||
StringView as_string_view;
|
||||
String as_string; // This member only used if the parser couldn't use the original source verbatim.
|
||||
DeprecatedString as_string; // This member only used if the parser couldn't use the original source verbatim.
|
||||
bool is_string_view { true };
|
||||
|
||||
bool operator==(StringView other) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue