MCPcopy Create free account
hub / github.com/Kitware/CMake / ParseKeyValuePair

Method ParseKeyValuePair

Source/cmVisualStudioSlnParser.cxx:612–626  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

610}
611
612bool cmVisualStudioSlnParser::ParseKeyValuePair(std::string const& line,
613 ParsedLine& parsedLine,
614 State& /*state*/)
615{
616 size_t idxEqualSign = line.find('=');
617 if (idxEqualSign == std::string::npos) {
618 parsedLine.CopyVerbatim(line);
619 return true;
620 }
621 std::string const& key = line.substr(0, idxEqualSign);
622 parsedLine.SetTag(cmTrimWhitespace(key));
623 std::string const& value = line.substr(idxEqualSign + 1);
624 parsedLine.AddValue(cmTrimWhitespace(value));
625 return true;
626}
627
628bool cmVisualStudioSlnParser::ParseTag(cm::string_view fullTag,
629 ParsedLine& parsedLine, State& state)

Callers 1

ParseImplMethod · 0.95

Calls 6

cmTrimWhitespaceFunction · 0.85
CopyVerbatimMethod · 0.80
SetTagMethod · 0.80
AddValueMethod · 0.80
findMethod · 0.45
substrMethod · 0.45

Tested by

no test coverage detected