| 1231 | #endif // GTEST_HAS_STD_WSTRING |
| 1232 | |
| 1233 | void SplitString(const ::std::string& str, char delimiter, |
| 1234 | ::std::vector< ::std::string>* dest) { |
| 1235 | ::std::vector< ::std::string> parsed; |
| 1236 | ::std::string::size_type pos = 0; |
| 1237 | while (::testing::internal::AlwaysTrue()) { |
| 1238 | const ::std::string::size_type colon = str.find(delimiter, pos); |
| 1239 | if (colon == ::std::string::npos) { |
| 1240 | parsed.push_back(str.substr(pos)); |
| 1241 | break; |
| 1242 | } else { |
| 1243 | parsed.push_back(str.substr(pos, colon - pos)); |
| 1244 | pos = colon + 1; |
| 1245 | } |
| 1246 | } |
| 1247 | dest->swap(parsed); |
| 1248 | } |
| 1249 | |
| 1250 | } // namespace internal |
| 1251 |
no test coverage detected