MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / getKeyValuePair

Function getKeyValuePair

Tactility/Source/file/PropertiesFile.cpp:12–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10static const auto LOGGER = Logger("PropertiesFile");
11
12bool getKeyValuePair(const std::string& input, std::string& key, std::string& value) {
13 auto index = input.find('=');
14 if (index == std::string::npos) {
15 return false;
16 }
17 key = input.substr(0, index);
18 value = input.substr(index + 1);
19 return true;
20}
21
22bool loadPropertiesFile(const std::string& filePath, std::function<void(const std::string& key, const std::string& value)> callback) {
23 // Reading properties is a common operation; make this debug-level to avoid

Callers 1

loadPropertiesFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected