Ignores max_line_length but won't overflow
| 58 | |
| 59 | // Ignores max_line_length but won't overflow |
| 60 | std::string_view LineReader::ReadLength(size_t len) |
| 61 | { |
| 62 | if (len == 0) return {}; |
| 63 | if (Remaining() < len) throw std::runtime_error("Not enough data in buffer"); |
| 64 | std::string_view out(reinterpret_cast<const char*>(std::to_address(it)), len); |
| 65 | it += len; |
| 66 | return out; |
| 67 | } |
| 68 | |
| 69 | size_t LineReader::Remaining() const |
| 70 | { |
no outgoing calls