mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:47:37 +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
|
@ -153,7 +153,7 @@ ByteBuffer IODevice::read_all()
|
|||
return {};
|
||||
}
|
||||
|
||||
String IODevice::read_line(size_t max_size)
|
||||
DeprecatedString IODevice::read_line(size_t max_size)
|
||||
{
|
||||
if (m_fd < 0)
|
||||
return {};
|
||||
|
@ -166,7 +166,7 @@ String IODevice::read_line(size_t max_size)
|
|||
dbgln("IODevice::read_line: At EOF but there's more than max_size({}) buffered", max_size);
|
||||
return {};
|
||||
}
|
||||
auto line = String((char const*)m_buffered_data.data(), m_buffered_data.size(), Chomp);
|
||||
auto line = DeprecatedString((char const*)m_buffered_data.data(), m_buffered_data.size(), Chomp);
|
||||
m_buffered_data.clear();
|
||||
return line;
|
||||
}
|
||||
|
@ -185,7 +185,7 @@ String IODevice::read_line(size_t max_size)
|
|||
new_buffered_data.append(m_buffered_data.data() + line_index, m_buffered_data.size() - line_index);
|
||||
m_buffered_data = move(new_buffered_data);
|
||||
line.resize(line_index);
|
||||
return String::copy(line, Chomp);
|
||||
return DeprecatedString::copy(line, Chomp);
|
||||
}
|
||||
}
|
||||
return {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue