Returns true iff regular expression re matches a substring of str (including str itself).
| 7936 | // Returns true iff regular expression re matches a substring of str |
| 7937 | // (including str itself). |
| 7938 | bool RE::PartialMatch(const char* str, const RE& re) { |
| 7939 | if (!re.is_valid_) return false; |
| 7940 | |
| 7941 | regmatch_t match; |
| 7942 | return regexec(&re.partial_regex_, str, 1, &match, 0) == 0; |
| 7943 | } |
| 7944 | |
| 7945 | // Initializes an RE from its string representation. |
| 7946 | void RE::Init(const char* regex) { |
nothing calls this directly
no test coverage detected