mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 06:28:13 +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:
parent
6e19ab2bbc
commit
57dc179b1f
597 changed files with 1973 additions and 1972 deletions
|
@ -125,7 +125,7 @@ Vector<DeprecatedString, 32> TextLayout::wrap_lines(TextElision elision, TextWra
|
|||
for (Block& block : blocks) {
|
||||
switch (block.type) {
|
||||
case BlockType::Newline: {
|
||||
lines.append(builder.to_string());
|
||||
lines.append(builder.to_deprecated_string());
|
||||
builder.clear();
|
||||
line_width = 0;
|
||||
|
||||
|
@ -147,7 +147,7 @@ Vector<DeprecatedString, 32> TextLayout::wrap_lines(TextElision elision, TextWra
|
|||
}
|
||||
|
||||
if (wrapping == TextWrapping::Wrap && line_width + block_width > static_cast<unsigned>(m_rect.width())) {
|
||||
lines.append(builder.to_string());
|
||||
lines.append(builder.to_deprecated_string());
|
||||
builder.clear();
|
||||
line_width = 0;
|
||||
}
|
||||
|
@ -166,7 +166,7 @@ Vector<DeprecatedString, 32> TextLayout::wrap_lines(TextElision elision, TextWra
|
|||
|
||||
blocks_processed:
|
||||
if (!did_not_finish) {
|
||||
auto last_line = builder.to_string();
|
||||
auto last_line = builder.to_deprecated_string();
|
||||
if (!last_line.is_empty())
|
||||
lines.append(last_line);
|
||||
}
|
||||
|
@ -212,7 +212,7 @@ DeprecatedString TextLayout::elide_text_from_right(Utf8View text, bool force_eli
|
|||
StringBuilder builder;
|
||||
builder.append(text.substring_view(0, offset).as_string());
|
||||
builder.append("..."sv);
|
||||
return builder.to_string();
|
||||
return builder.to_deprecated_string();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue