----------------------------------------------------------------------------
| 383 | |
| 384 | //---------------------------------------------------------------------------- |
| 385 | int32_t |
| 386 | DFA::match(std::string_view str) const |
| 387 | { |
| 388 | for (auto spot = _patterns.begin(), limit = _patterns.end(); spot != limit; ++spot) { |
| 389 | if (spot->_re.exec(str)) { |
| 390 | return spot - _patterns.begin(); |
| 391 | } |
| 392 | } |
| 393 | |
| 394 | return -1; |
| 395 | } |
no test coverage detected