MCPcopy Create free account
hub / github.com/awslabs/aws-lambda-cpp / ParseStringFlag

Function ParseStringFlag

tests/gtest/gtest-all.cc:7234–7244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7232// true. On failure, returns false without changing *value.
7233template <typename String>
7234static bool ParseStringFlag(const char* str, const char* flag, String* value) {
7235 // Gets the value of the flag as a string.
7236 const char* const value_str = ParseFlagValue(str, flag, false);
7237
7238 // Aborts if the parsing failed.
7239 if (value_str == nullptr) return false;
7240
7241 // Sets *value to the value of the flag.
7242 *value = value_str;
7243 return true;
7244}
7245
7246// Determines whether a string has a prefix that Google Test uses for its
7247// flags, i.e., starts with GTEST_FLAG_PREFIX_ or GTEST_FLAG_PREFIX_DASH_.

Callers 2

ParseGoogleTestFlagFunction · 0.85

Calls 1

ParseFlagValueFunction · 0.85

Tested by

no test coverage detected