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

Method check_name

simcore/framework/src/cli/cli.hpp:6206–6232  ·  view source on GitHub ↗

Check the name, case insensitive and underscore insensitive if set

Source from the content-addressed store, hash-verified

6204
6205 /// Check the name, case insensitive and underscore insensitive if set
6206 bool check_name(std::string name_to_check) const {
6207 std::string local_name = name_;
6208 if (ignore_underscore_) {
6209 local_name = detail::remove_underscore(name_);
6210 name_to_check = detail::remove_underscore(name_to_check);
6211 }
6212 if (ignore_case_) {
6213 local_name = detail::to_lower(name_);
6214 name_to_check = detail::to_lower(name_to_check);
6215 }
6216
6217 if (local_name == name_to_check) {
6218 return true;
6219 }
6220 for (auto les : aliases_) {
6221 if (ignore_underscore_) {
6222 les = detail::remove_underscore(les);
6223 }
6224 if (ignore_case_) {
6225 les = detail::to_lower(les);
6226 }
6227 if (les == name_to_check) {
6228 return true;
6229 }
6230 }
6231 return false;
6232 }
6233
6234 /// Get the groups available directly from this option (in order)
6235 std::vector<std::string> get_groups() const {

Callers 4

get_subcommand_ptrMethod · 0.45
get_option_no_throwMethod · 0.45
_find_subcommandMethod · 0.45
AppClass · 0.45

Calls 2

remove_underscoreFunction · 0.85
to_lowerFunction · 0.85

Tested by

no test coverage detected