| 12 | |
| 13 | namespace util { |
| 14 | void ReplaceAll(std::string& in_out, const std::string& search, const std::string& substitute) |
| 15 | { |
| 16 | if (search.empty()) return; |
| 17 | in_out = std::regex_replace(in_out, std::regex(search), substitute); |
| 18 | } |
| 19 | |
| 20 | LineReader::LineReader(std::span<const std::byte> buffer, size_t max_line_length) |
| 21 | : start(buffer.begin()), end(buffer.end()), max_line_length(max_line_length), it(buffer.begin()) {} |