mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 15:17:45 +00:00
LibCore: Make IODevice::read_line() return a String
Almost everyone using this API actually wanted String instead of a ByteBuffer anyway, and there were a bunch of slightly different ways clients would convert to String. Let's just cut out all the confusion and make it return String. :^)
This commit is contained in:
parent
4da327d650
commit
b9b7b2b28a
22 changed files with 50 additions and 66 deletions
|
@ -72,8 +72,7 @@ void LookupServer::load_etc_hosts()
|
|||
auto line = file->read_line(1024);
|
||||
if (line.is_empty())
|
||||
break;
|
||||
auto str_line = String((const char*)line.data(), line.size() - 1, Chomp);
|
||||
auto fields = str_line.split('\t');
|
||||
auto fields = line.split('\t');
|
||||
|
||||
auto sections = fields[0].split('.');
|
||||
IPv4Address addr {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue