MCPcopy Create free account
hub / github.com/apache/kvrocks / RegexMatch

Function RegexMatch

src/common/string_util.cc:390–401  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

388}
389
390std::vector<std::string> RegexMatch(const std::string &str, const std::string &regex) {
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
403std::string StringToHex(std::string_view input) {
404 static const char hex_digits[] = "0123456789ABCDEF";

Callers 2

TESTFunction · 0.85

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.68