1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:07:34 +00:00

Everywhere: Rename to_{string => deprecated_string}() where applicable

This will make it easier to support both string types at the same time
while we convert code, and tracking down remaining uses.

One big exception is Value::to_string() in LibJS, where the name is
dictated by the ToString AO.
This commit is contained in:
Linus Groh 2022-12-06 01:12:49 +00:00 committed by Andreas Kling
parent 6e19ab2bbc
commit 57dc179b1f
597 changed files with 1973 additions and 1972 deletions

View file

@ -152,7 +152,7 @@ DeprecatedString TextDocumentLine::to_utf8() const
{
StringBuilder builder;
builder.append(view());
return builder.to_string();
return builder.to_deprecated_string();
}
TextDocumentLine::TextDocumentLine(TextDocument& document)
@ -353,7 +353,7 @@ DeprecatedString TextDocument::text() const
if (i != line_count() - 1)
builder.append('\n');
}
return builder.to_string();
return builder.to_deprecated_string();
}
DeprecatedString TextDocument::text_in_range(TextRange const& a_range) const
@ -379,7 +379,7 @@ DeprecatedString TextDocument::text_in_range(TextRange const& a_range) const
builder.append('\n');
}
return builder.to_string();
return builder.to_deprecated_string();
}
u32 TextDocument::code_point_at(TextPosition const& position) const
@ -800,7 +800,7 @@ bool InsertTextCommand::merge_with(GUI::Command const& other)
StringBuilder builder(m_text.length() + typed_other.m_text.length());
builder.append(m_text);
builder.append(typed_other.m_text);
m_text = builder.to_string();
m_text = builder.to_deprecated_string();
m_range.set_end(typed_other.m_range.end());
m_timestamp = Time::now_monotonic();
@ -900,7 +900,7 @@ bool RemoveTextCommand::merge_with(GUI::Command const& other)
StringBuilder builder(m_text.length() + typed_other.m_text.length());
builder.append(typed_other.m_text);
builder.append(m_text);
m_text = builder.to_string();
m_text = builder.to_deprecated_string();
m_range.set_start(typed_other.m_range.start());
m_timestamp = Time::now_monotonic();