mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 01:17: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,10 +6,10 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/DeprecatedString.h>
|
||||
#include <AK/GenericLexer.h>
|
||||
#include <AK/OwnPtr.h>
|
||||
#include <AK/Stream.h>
|
||||
#include <AK/String.h>
|
||||
#include <AK/StringView.h>
|
||||
#include <AK/Types.h>
|
||||
#include <AK/Vector.h>
|
||||
|
@ -35,8 +35,8 @@ inline WriterBehavior operator|(WriterBehavior left, WriterBehavior right)
|
|||
}
|
||||
|
||||
struct WriterTraits {
|
||||
String separator;
|
||||
String quote { "\"" };
|
||||
DeprecatedString separator;
|
||||
DeprecatedString quote { "\"" };
|
||||
enum QuoteEscape {
|
||||
Repeat,
|
||||
Backslash,
|
||||
|
@ -79,7 +79,7 @@ public:
|
|||
|
||||
bool has_error() const { return m_error != WriteError::None; }
|
||||
WriteError error() const { return m_error; }
|
||||
String error_string() const
|
||||
DeprecatedString error_string() const
|
||||
{
|
||||
switch (m_error) {
|
||||
#define E(x, y) \
|
||||
|
@ -137,7 +137,7 @@ private:
|
|||
template<typename T>
|
||||
void write_entry(T&& entry)
|
||||
{
|
||||
auto string = String::formatted("{}", FormatIfSupported(entry));
|
||||
auto string = DeprecatedString::formatted("{}", FormatIfSupported(entry));
|
||||
|
||||
auto safe_to_write_normally = (m_behaviors & WriterBehavior::QuoteAll) == WriterBehavior::None
|
||||
&& !string.contains('\n')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue