MCPcopy Create free account
hub / github.com/brichard19/BitCrack / readEntry

Method readEntry

KeyFinder/ConfigFile.cpp:17–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15}
16
17ConfigFileEntry ConfigFileReader::readEntry(const std::string &line)
18{
19 size_t eqPos = line.find('=');
20
21 if(eqPos == std::string::npos) {
22 throw std::string("Invalid syntax");
23 }
24
25 std::string leftSide = util::trim(line.substr(0, eqPos), ' ');
26
27 std::string rightSide = util::trim(line.substr(eqPos + 1), ' ');
28
29 return ConfigFileEntry(leftSide, rightSide);
30}
31
32std::map<std::string, ConfigFileEntry> ConfigFileReader::read()
33{

Callers

nothing calls this directly

Calls 2

trimFunction · 0.85
ConfigFileEntryClass · 0.85

Tested by

no test coverage detected