mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-05-28 14:55:22 +02:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user