| 111 | } |
| 112 | |
| 113 | size_t first_word_end(std::string& str, size_t start) { |
| 114 | const std::string chars = "\t\n\v\f\r "; |
| 115 | size_t next_word_start = str.find_first_not_of(chars, start); |
| 116 | size_t next_word_end = str.find_first_of(chars, next_word_start); |
| 117 | if (next_word_end == std::string::npos || next_word_end > str.size()) |
| 118 | return str.size(); |
| 119 | return next_word_end; |
| 120 | } |
| 121 | |
| 122 | std::string first_word(std::string& str, size_t start) { |
| 123 | // If start is (at least) the length of str, then next_word_start is |
no test coverage detected