MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / SplitConfigPath

Function SplitConfigPath

apps/tools/Tools/commands/ConfigCommand.cpp:179–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

177}
178
179static std::vector<std::string> SplitConfigPath(const std::string& path)
180{
181 std::vector<std::string> parts;
182 std::string rem = path;
183 while (true)
184 {
185 auto pos = rem.find(">>");
186 if (pos == std::string::npos)
187 {
188 std::string part = Trim(rem);
189 if (!part.empty())
190 parts.push_back(part);
191 break;
192 }
193
194 std::string part = Trim(rem.substr(0, pos));
195 if (!part.empty())
196 parts.push_back(part);
197 rem = rem.substr(pos + 2);
198 }
199 return parts;
200}
201
202void ConfigCommand::Setup(CLI::App& app)
203{

Callers 1

RemoveMethod · 0.85

Calls 2

TrimFunction · 0.70
emptyMethod · 0.45

Tested by

no test coverage detected