MCPcopy Create free account
hub / github.com/Unsigned-Long/iKalibr / SplitString

Function SplitString

src/util/utils.cpp:243–258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

241}
242
243std::vector<std::string> SplitString(const std::string &str, char splitor, bool ignoreEmpty) {
244 std::vector<std::string> vec;
245 auto iter = str.cbegin();
246 while (true) {
247 auto pos = std::find(iter, str.cend(), splitor);
248 auto elem = std::string(iter, pos);
249 if (!(elem.empty() && ignoreEmpty)) {
250 vec.push_back(elem);
251 }
252 if (pos == str.cend()) {
253 break;
254 }
255 iter = ++pos;
256 }
257 return vec;
258}
259
260bool _1_(const std::string &a) {
261 std::ifstream b(a);

Callers 3

mainFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected