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

Function FormatCapture

extern/re2/re2/testing/tester.cc:115–122  ·  view source on GitHub ↗

Formats a single capture range s in text in the form (a,b) where a and b are the starting and ending offsets of s in text.

Source from the content-addressed store, hash-verified

113// Formats a single capture range s in text in the form (a,b)
114// where a and b are the starting and ending offsets of s in text.
115static std::string FormatCapture(const StringPiece& text,
116 const StringPiece& s) {
117 if (s.data() == NULL)
118 return "(?,?)";
119 return StringPrintf("(%td,%td)",
120 s.begin() - text.begin(),
121 s.end() - text.begin());
122}
123
124// Returns whether text contains non-ASCII (>= 0x80) bytes.
125static bool NonASCII(const StringPiece& text) {

Callers 3

AddToThreadqMethod · 0.85
SearchMethod · 0.85
RunCaseMethod · 0.85

Calls 4

StringPrintfFunction · 0.85
dataMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected