| 6335 | // true. On failure, returns false without changing *value. |
| 6336 | template <typename String> |
| 6337 | static bool ParseStringFlag(const char* str, const char* flag, String* value) { |
| 6338 | // Gets the value of the flag as a string. |
| 6339 | const char* const value_str = ParseFlagValue(str, flag, false); |
| 6340 | |
| 6341 | // Aborts if the parsing failed. |
| 6342 | if (value_str == nullptr) return false; |
| 6343 | |
| 6344 | // Sets *value to the value of the flag. |
| 6345 | *value = value_str; |
| 6346 | return true; |
| 6347 | } |
| 6348 | |
| 6349 | // Determines whether a string has a prefix that Google Test uses for its |
| 6350 | // flags, i.e., starts with GTEST_FLAG_PREFIX_ or GTEST_FLAG_PREFIX_DASH_. |
no test coverage detected