inline std::string_view read_until(std::string_view& v, char sep)
{
size_t i = v.find(sep);
std::string_view ret = v.substr(0, i);
v.remove_prefix(i == std::string_view::npos ? i : i + 1);
return ret;
}
I find it quite useful, perhaps it could be added to the library.