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

Method FormatCapture

extern/re2/re2/nfa.cc:432–446  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

430}
431
432std::string NFA::FormatCapture(const char** capture) {
433 std::string s;
434 for (int i = 0; i < ncapture_; i+=2) {
435 if (capture[i] == NULL)
436 s += "(?,?)";
437 else if (capture[i+1] == NULL)
438 s += StringPrintf("(%td,?)",
439 capture[i] - btext_);
440 else
441 s += StringPrintf("(%td,%td)",
442 capture[i] - btext_,
443 capture[i+1] - btext_);
444 }
445 return s;
446}
447
448bool NFA::Search(const StringPiece& text, const StringPiece& const_context,
449 bool anchored, bool longest,

Callers

nothing calls this directly

Calls 1

StringPrintfFunction · 0.85

Tested by

no test coverage detected