3std::string_view
tokenize(std::string_view& str,
char delim,
char quot){
9 auto token_begin = str.begin();
10 while(token_begin != str.end()){
11 if(*token_begin == quot)
13 else if(*token_begin != delim)
19 auto token_end = token_begin;
20 while(token_end != str.end()){
21 if(*token_end == quot){
22 str = std::string_view(token_end, str.end() - token_end);
24 return std::string_view(token_begin, token_end - token_begin);
26 else if(*token_end == delim && !escaped)
32 str = std::string_view(token_end, str.end() - token_end);
34 return std::string_view(token_begin, token_end - token_begin);