| 1130 | #endif // GTEST_HAS_STD_WSTRING |
| 1131 | |
| 1132 | void SplitString(const ::std::string& str, char delimiter, |
| 1133 | ::std::vector< ::std::string>* dest) { |
| 1134 | ::std::vector< ::std::string> parsed; |
| 1135 | ::std::string::size_type pos = 0; |
| 1136 | while (::testing::internal::AlwaysTrue()) { |
| 1137 | const ::std::string::size_type colon = str.find(delimiter, pos); |
| 1138 | if (colon == ::std::string::npos) { |
| 1139 | parsed.push_back(str.substr(pos)); |
| 1140 | break; |
| 1141 | } else { |
| 1142 | parsed.push_back(str.substr(pos, colon - pos)); |
| 1143 | pos = colon + 1; |
| 1144 | } |
| 1145 | } |
| 1146 | dest->swap(parsed); |
| 1147 | } |
| 1148 | |
| 1149 | } // namespace internal |
| 1150 |
no test coverage detected