util::LineReader::ReadLength

Returns string from current iterator position of specified length if possible and advances iterator on success. May exceed max_line_length but will not read past end of buffer.

Synopsis

Declared in <util/string.h>

std::string_view
ReadLength(size_t len);

Exceptions

NameThrown on
std::runtime_errorif there is not enough data in the buffer.

Return Value

a string of the expected length.

Parameters

NameDescription
len [in]The number of bytes to read from the buffer