MCPcopy Create free account
hub / github.com/awslabs/aws-lambda-cpp / SplitString

Function SplitString

tests/gtest/gtest-all.cc:2426–2441  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2424#endif // GTEST_HAS_STD_WSTRING
2425
2426void 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

Callers 2

LoadFlagsFromFileFunction · 0.85

Calls 2

AlwaysTrueFunction · 0.85
swapMethod · 0.45

Tested by

no test coverage detected