MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / FirstMatch

Method FirstMatch

extern/re2/re2/filtered_re2.cc:95–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95int FilteredRE2::FirstMatch(const StringPiece& text,
96 const std::vector<int>& atoms) const {
97 if (!compiled_) {
98 LOG(DFATAL) << "FirstMatch called before Compile.";
99 return -1;
100 }
101 std::vector<int> regexps;
102 prefilter_tree_->RegexpsGivenStrings(atoms, &regexps);
103 for (size_t i = 0; i < regexps.size(); i++)
104 if (RE2::PartialMatch(text, *re2_vec_[regexps[i]]))
105 return regexps[i];
106 return -1;
107}
108
109bool FilteredRE2::AllMatches(
110 const StringPiece& text,

Callers 2

mainFunction · 0.80
TESTFunction · 0.80

Calls 2

RegexpsGivenStringsMethod · 0.45
sizeMethod · 0.45

Tested by 2

mainFunction · 0.64
TESTFunction · 0.64