| 388 | } |
| 389 | |
| 390 | std::vector<std::string> RegexMatch(const std::string &str, const std::string ®ex) { |
| 391 | std::regex base_regex(regex); |
| 392 | std::smatch pieces_match; |
| 393 | std::vector<std::string> out; |
| 394 | |
| 395 | if (std::regex_match(str, pieces_match, base_regex)) { |
| 396 | for (const auto &piece : pieces_match) { |
| 397 | out.emplace_back(piece.str()); |
| 398 | } |
| 399 | } |
| 400 | return out; |
| 401 | } |
| 402 | |
| 403 | std::string StringToHex(std::string_view input) { |
| 404 | static const char hex_digits[] = "0123456789ABCDEF"; |
no outgoing calls