MCPcopy Create free account
hub / github.com/KhronosGroup/KTX-Software / SplitString

Function SplitString

tests/gtest/src/gtest.cc:1132–1147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1130#endif // GTEST_HAS_STD_WSTRING
1131
1132void 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

Callers 2

LoadFlagsFromFileFunction · 0.70

Calls 4

AlwaysTrueFunction · 0.70
findMethod · 0.45
push_backMethod · 0.45
swapMethod · 0.45

Tested by

no test coverage detected