introduce string_view

This commit is contained in:
Chunting Gu
2021-06-17 18:58:53 +08:00
parent 751a3539ae
commit 26bb6b341a
38 changed files with 404 additions and 344 deletions
+1 -2
View File
@@ -29,8 +29,7 @@ bool ReadFile(const fs::path& path, std::string* output);
// Dump the string data line by line to achieve more readability.
// Also limit the maximum size of the data to be dumped.
void DumpByLine(const std::string& data, std::ostream& os,
const std::string& prefix);
void DumpByLine(const std::string& data, std::ostream& os, string_view prefix);
// Print TCP endpoint.
// Usage: PrintEndpoint(std::cout, endpoint)