Small overhaul using string_view
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
#include "wrap-string.hpp"
|
||||
#include "wrap-vector.hpp"
|
||||
|
||||
#include <istream>
|
||||
#include <ostream>
|
||||
#include <string_view>
|
||||
|
||||
namespace drv {
|
||||
@@ -13,6 +15,18 @@ void split_host_port(std::string_view target, std::string &host, std::string &po
|
||||
|
||||
std::vector<std::string> parse_control_lst(std::string_view ctrl);
|
||||
|
||||
|
||||
|
||||
// Write encoded data to a replay log.
|
||||
void wlog_byte(std::ostream &s, uint8_t byte);
|
||||
void wlog_uint16(std::ostream &s, uint16_t v);
|
||||
void wlog_string(std::ostream &s, std::string_view v);
|
||||
|
||||
// Read encoded data from a file.
|
||||
uint8_t rlog_byte(std::istream &s);
|
||||
uint16_t rlog_uint16(std::istream &s);
|
||||
std::string_view rlog_string(std::istream &s, char *buf, size_t buflen);
|
||||
|
||||
}
|
||||
|
||||
#endif // DRIVER_UTIL_HPP
|
||||
|
||||
Reference in New Issue
Block a user