MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / parseOption

Function parseOption

tests/framework/src/doctest.cpp:3395–3405  ·  view source on GitHub ↗

parses an option and returns the string after the '=' character

Source from the content-addressed store, hash-verified

3393
3394 // parses an option and returns the string after the '=' character
3395 bool parseOption(int argc, const char* const* argv, const char* pattern, String* value = nullptr,
3396 const String& defaultVal = String()) {
3397 if(value)
3398 *value = defaultVal;
3399#ifndef DOCTEST_CONFIG_NO_UNPREFIXED_OPTIONS
3400 // offset (normally 3 for "dt-") to skip prefix
3401 if(parseOptionImpl(argc, argv, pattern + strlen(DOCTEST_CONFIG_OPTIONS_PREFIX), value))
3402 return true;
3403#endif // DOCTEST_CONFIG_NO_UNPREFIXED_OPTIONS
3404 return parseOptionImpl(argc, argv, pattern, value);
3405 }
3406
3407 // locates a flag on the command line
3408 bool parseFlag(int argc, const char* const* argv, const char* pattern) {

Callers 4

parseSkeletonMethod · 0.85
parseFlagFunction · 0.85
parseCommaSepArgsFunction · 0.85
parseIntOptionFunction · 0.85

Calls 2

parseOptionImplFunction · 0.85
StringClass · 0.50

Tested by

no test coverage detected