regex_utils.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <algorithm>
4 #include <regex>
5 #include <string>
6 #include <vector>
7 
8 namespace foxglove {
9 
10 inline bool isWhitelisted(const std::string& name, const std::vector<std::regex>& regexPatterns) {
11  return std::find_if(regexPatterns.begin(), regexPatterns.end(), [name](const auto& regex) {
12  return std::regex_match(name, regex);
13  }) != regexPatterns.end();
14 }
15 
16 } // namespace foxglove
bool isWhitelisted(const std::string &name, const std::vector< std::regex > &regexPatterns)
Definition: regex_utils.hpp:10


foxglove_bridge
Author(s): Foxglove
autogenerated on Mon Jul 3 2023 02:12:22