| 7232 | // true. On failure, returns false without changing *value. |
| 7233 | template <typename String> |
| 7234 | static 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_. |
no test coverage detected