| 2424 | #endif // GTEST_HAS_STD_WSTRING |
| 2425 | |
| 2426 | void SplitString(const ::std::string& str, char delimiter, |
| 2427 | ::std::vector< ::std::string>* dest) { |
| 2428 | ::std::vector< ::std::string> parsed; |
| 2429 | ::std::string::size_type pos = 0; |
| 2430 | while (::testing::internal::AlwaysTrue()) { |
| 2431 | const ::std::string::size_type colon = str.find(delimiter, pos); |
| 2432 | if (colon == ::std::string::npos) { |
| 2433 | parsed.push_back(str.substr(pos)); |
| 2434 | break; |
| 2435 | } else { |
| 2436 | parsed.push_back(str.substr(pos, colon - pos)); |
| 2437 | pos = colon + 1; |
| 2438 | } |
| 2439 | } |
| 2440 | dest->swap(parsed); |
| 2441 | } |
| 2442 | |
| 2443 | } // namespace internal |
| 2444 |
no test coverage detected