29 const absl::string_view
message) {
30 std::vector<std::string>
strings;
33 absl::string_view remainder =
message;
34 for (std::size_t
end = 0;
end = remainder.find(
'\n'),
end != remainder.npos;
35 remainder = remainder.substr(
end + 1)) {
36 const auto line = remainder.substr(0,
end);
37 if (!unfinished_line_.empty()) {
38 std::string new_message = std::move(unfinished_line_);
39 unfinished_line_.clear();
40 absl::StrAppend(&new_message,
line);
41 strings.push_back(std::move(new_message));
50 absl::StrAppend(&unfinished_line_, remainder);