Returns true iff regular expression re matches a substring of str (including str itself).
| 9201 | // Returns true iff regular expression re matches a substring of str |
| 9202 | // (including str itself). |
| 9203 | bool RE::PartialMatch(const char* str, const RE& re) { |
| 9204 | if (!re.is_valid_) return false; |
| 9205 | |
| 9206 | regmatch_t match; |
| 9207 | return regexec(&re.partial_regex_, str, 1, &match, 0) == 0; |
| 9208 | } |
| 9209 | |
| 9210 | // Initializes an RE from its string representation. |
| 9211 | void RE::Init(const char* regex) { |
nothing calls this directly
no test coverage detected