output_to.cc
Go to the documentation of this file.
2 
3 #include <regex>
4 
5 namespace {
6  std::regex const re_stdout{R"((STDOUT|cout))",
7  std::regex_constants::ECMAScript |
8  std::regex_constants::icase};
9  std::regex const re_stderr{R"((STDERR|cerr))",
10  std::regex_constants::ECMAScript |
11  std::regex_constants::icase};
12 }
13 
14 bool
16 {
17  return std::regex_match(spec, re_stderr);
18 }
19 
20 bool
22 {
23  return std::regex_match(spec, re_stdout);
24 }
std::string string
Definition: nybbler.cc:12
bool output_to_stderr(std::string const &spec)
Definition: output_to.cc:15
bool output_to_stdout(std::string const &spec)
Definition: output_to.cc:21