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

GHttp: Work on bringing this up.

This commit is contained in:
Andreas Kling 2019-04-07 19:35:07 +02:00
parent 8f30657390
commit 51b4d3fe5a
9 changed files with 93 additions and 16 deletions

View file

@ -92,13 +92,13 @@ ByteBuffer String::to_byte_buffer() const
return ByteBuffer::copy(reinterpret_cast<const byte*>(characters()), length());
}
String String::from_byte_buffer(const ByteBuffer& buffer)
String String::from_byte_buffer(const ByteBuffer& buffer, ShouldChomp should_chomp)
{
if (buffer.is_null())
return nullptr;
if (buffer.is_empty())
return empty();
return String((const char*)buffer.pointer(), buffer.size());
return String((const char*)buffer.pointer(), buffer.size(), should_chomp);
}
unsigned String::to_uint(bool& ok) const