| 431 | } |
| 432 | |
| 433 | std::string common_chat_msg_parser::consume_rest() { |
| 434 | auto rest = input_.substr(pos_); |
| 435 | pos_ = input_.size(); |
| 436 | return rest; |
| 437 | } |
| 438 | |
| 439 | // Tries to find the regex, consumes it (pos right after it) and gives the prelude (right before it) and the groups to the callback. |
| 440 | std::optional<common_chat_msg_parser::find_regex_result> common_chat_msg_parser::try_find_regex(const common_regex & regex, size_t from, bool add_prelude_to_content) { |