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

Function split_short

simcore/framework/src/cli/cli.hpp:1844–1851  ·  view source on GitHub ↗

Returns false if not a short option. Otherwise, sets opt name and rest and returns true

Source from the content-addressed store, hash-verified

1842
1843// Returns false if not a short option. Otherwise, sets opt name and rest and returns true
1844inline bool split_short(const std::string &current, std::string &name, std::string &rest) {
1845 if (current.size() > 1 && current[0] == '-' && valid_first_char(current[1])) {
1846 name = current.substr(1, 1);
1847 rest = current.substr(2);
1848 return true;
1849 }
1850 return false;
1851}
1852
1853// Returns false if not a long option. Otherwise, sets opt name and other side of = and returns true
1854inline bool split_long(const std::string &current, std::string &name, std::string &value) {

Callers 2

_recognizeMethod · 0.85
_parse_argMethod · 0.85

Calls 2

valid_first_charFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected