| 65 | */ |
| 66 | template<typename Pred> |
| 67 | std::string_view readWhile(Pred&& pred) { |
| 68 | auto start = position(); |
| 69 | while (tryParsePredicate(pred)) { |
| 70 | } |
| 71 | return substr(start, position()); |
| 72 | } |
| 73 | |
| 74 | /** |
| 75 | Read the string until the given character is found or the end of the buffer is reached. |