| 430 | } |
| 431 | |
| 432 | std::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 | |
| 448 | bool NFA::Search(const StringPiece& text, const StringPiece& const_context, |
| 449 | bool anchored, bool longest, |
nothing calls this directly
no test coverage detected