15 return fullToolName.substr(fullToolName.find_last_of(
'.') + 1);
18 std::vector<std::string>
20 std::vector<std::string>
result(toolNameVector.size());
29 std::regex re{
"^[a-zA-Z_][a-zA-Z0-9_]*(::)?[a-zA-Z0-9_]*$"};
30 return std::regex_match(toolName,
re);
36 auto isEmpty = [](
const std::string &
s){
return s.empty();};
37 if (std::any_of(toolNameVector.begin(), toolNameVector.end(), isEmpty) )
return "A tool name was empty.";
38 if (
auto pTheTool=std::find_if_not(toolNameVector.begin(), toolNameVector.end(),
validToolName); pTheTool != toolNameVector.end()) {
39 result =
"A tool name was invalid: " + *pTheTool;
46 std::set<std::string> setOfNames(nameVector.begin(), nameVector.end());
47 return setOfNames.size();