util/test: Add string_view constructor to LineReader and remove StringToBuffer

Co-Authored by: Hodlinator <172445034+hodlinator@users.noreply.github.com>
This commit is contained in:
Matthew Zipkin
2026-03-11 10:55:35 -04:00
parent b0ca400612
commit 3de02abf3f
2 changed files with 10 additions and 15 deletions

View File

@@ -270,6 +270,7 @@ struct LineReader {
std::span<const std::byte>::iterator it;
explicit LineReader(std::span<const std::byte> buffer, size_t max_line_length);
explicit LineReader(std::string_view str, size_t max_line_length) : LineReader{std::as_bytes(std::span{str}), max_line_length} {}
/**
* Returns a string from current iterator position up to (but not including) next \n