30using std::regex_search;
42 : vector<string> (noneg(argc-1))
44 for (
int i=1; i<argc; ++i)
47 (*this)[i-1] = argv[i];
57 static regex TOKENDEF{
"\\S+"};
59 string::const_iterator it = cmdline.begin();
60 string::const_iterator end = cmdline.end();
62 while (regex_search(it, end, match, TOKENDEF))
73 Cmdline::operator string ()
const
75 return join(*
this,
" ");
Class to encapsulate the typical C-style commandline definition.
Helper to use a single extension point for specialised hash functions.
This header is for including and configuring NoBug.
Implementation namespace for support and library code.
constexpr NUM noneg(NUM val)
cut a numeric value to be >=0
string join(COLL &&coll, string const &delim=", ")
enumerate a collection's contents, separated by delimiter.