mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04: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
|
@ -20,7 +20,7 @@
|
|||
|
||||
namespace HTTP {
|
||||
|
||||
static Optional<ByteBuffer> handle_content_encoding(ByteBuffer const& buf, String const& content_encoding)
|
||||
static Optional<ByteBuffer> handle_content_encoding(ByteBuffer const& buf, DeprecatedString const& content_encoding)
|
||||
{
|
||||
dbgln_if(JOB_DEBUG, "Job::handle_content_encoding: buf has content_encoding={}", content_encoding);
|
||||
|
||||
|
@ -187,11 +187,11 @@ void Job::register_on_ready_to_read(Function<void()> callback)
|
|||
};
|
||||
}
|
||||
|
||||
ErrorOr<String> Job::read_line(size_t size)
|
||||
ErrorOr<DeprecatedString> Job::read_line(size_t size)
|
||||
{
|
||||
auto buffer = TRY(ByteBuffer::create_uninitialized(size));
|
||||
auto bytes_read = TRY(m_socket->read_until(buffer, "\r\n"sv));
|
||||
return String::copy(bytes_read);
|
||||
return DeprecatedString::copy(bytes_read);
|
||||
}
|
||||
|
||||
ErrorOr<ByteBuffer> Job::receive(size_t size)
|
||||
|
@ -217,7 +217,7 @@ void Job::on_socket_connected()
|
|||
|
||||
if constexpr (JOB_DEBUG) {
|
||||
dbgln("Job: raw_request:");
|
||||
dbgln("{}", String::copy(raw_request));
|
||||
dbgln("{}", DeprecatedString::copy(raw_request));
|
||||
}
|
||||
|
||||
bool success = m_socket->write_or_error(raw_request);
|
||||
|
@ -453,7 +453,7 @@ void Job::on_socket_connected()
|
|||
break;
|
||||
} else {
|
||||
auto chunk = size_lines[0].split_view(';', SplitBehavior::KeepEmpty);
|
||||
String size_string = chunk[0];
|
||||
DeprecatedString size_string = chunk[0];
|
||||
char* endptr;
|
||||
auto size = strtoul(size_string.characters(), &endptr, 16);
|
||||
if (*endptr) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue