MCPcopy Create free account
hub / github.com/Tencent/TAD_Sim / valid_name_string

Function valid_name_string

simcore/framework/src/cli/cli.hpp:310–315  ·  view source on GitHub ↗

Verify an option name

Source from the content-addressed store, hash-verified

308
309/// Verify an option name
310inline bool valid_name_string(const std::string &str) {
311 if (str.empty() || !valid_first_char(str[0])) return false;
312 for (auto c : str.substr(1))
313 if (!valid_later_char(c)) return false;
314 return true;
315}
316
317/// Verify that str consists of letters only
318inline bool isalpha(const std::string &str) {

Callers 3

get_namesFunction · 0.85
aliasMethod · 0.85
add_subcommandMethod · 0.85

Calls 3

valid_first_charFunction · 0.85
valid_later_charFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected