MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / stringToOptions

Function stringToOptions

src/gui2/utils.cc:25–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23}
24
25OptionsMap stringToOptions(const std::string& optionsString)
26{
27 OptionsMap result;
28 for (auto it : std::views::split(optionsString, ' '))
29 {
30 std::string left(&*it.begin(), std::ranges::distance(it));
31 std::string right;
32 auto i = left.find('=');
33 if (i != std::string::npos)
34 {
35 right = left.substr(i + 1);
36 left = left.substr(0, i);
37 }
38 result[left] = right;
39 }
40 return result;
41}
42
43std::string optionsToString(const OptionsMap& options)
44{

Callers 2

wtRebuildConfigurationFunction · 0.85
emitOptionsFunction · 0.85

Calls 3

splitFunction · 0.50
beginMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected