| 86 | } |
| 87 | |
| 88 | bool LogGuard::findAllAndRemove(const std::string & sPattern) const |
| 89 | { |
| 90 | bool found = false; |
| 91 | std::regex pattern(sPattern); |
| 92 | std::smatch match; |
| 93 | while (std::regex_search(g_output, match, pattern)) |
| 94 | { |
| 95 | found = true; |
| 96 | auto pos = std::next(g_output.begin(), match.position()); |
| 97 | auto end = std::next(pos, match.length()); |
| 98 | g_output.erase(pos, end); |
| 99 | } |
| 100 | return found; |
| 101 | } |
| 102 | |
| 103 | void LogGuard::print() |
| 104 | { |
no test coverage detected