MCPcopy Create free account
hub / github.com/CppMicroServices/CppMicroServices / SplitString

Function SplitString

util/src/FileSystem.cpp:106–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104 }
105
106 std::vector<std::string>
107 SplitString(std::string const& str, std::string const& delim)
108 {
109 std::vector<std::string> token;
110 std::size_t b = str.find_first_not_of(delim);
111 std::size_t e = str.find_first_of(delim, b);
112 while (e > b)
113 {
114 token.emplace_back(str.substr(b, e - b));
115 b = str.find_first_not_of(delim, e);
116 e = str.find_first_of(delim, b);
117 }
118 return token;
119 }
120
121#ifndef MAXPATHLEN
122# define MAXPATHLEN 1024

Callers 1

MakePathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected