| 95 | } |
| 96 | |
| 97 | void StringConsumer::Skip(size_type len) |
| 98 | { |
| 99 | if (len == std::string_view::npos) { |
| 100 | this->position = this->src.size(); |
| 101 | } else if (size_type max_len = GetBytesLeft(); len > max_len) { |
| 102 | LogError(fmt::format("Source buffer too short: {} > {}", len, max_len)); |
| 103 | this->position = this->src.size(); |
| 104 | } else { |
| 105 | this->position += len; |
| 106 | } |
| 107 | } |
| 108 | |
| 109 | StringConsumer::size_type StringConsumer::Find(std::string_view str) const |
| 110 | { |
no test coverage detected