Changeset View
Changeset View
Standalone View
Standalone View
src/util/system.cpp
Show First 20 Lines • Show All 296 Lines • ▼ Show 20 Lines | |||||
bool ParseKeyValue(std::string &key, std::string &val) { | bool ParseKeyValue(std::string &key, std::string &val) { | ||||
size_t is_index = key.find('='); | size_t is_index = key.find('='); | ||||
if (is_index != std::string::npos) { | if (is_index != std::string::npos) { | ||||
val = key.substr(is_index + 1); | val = key.substr(is_index + 1); | ||||
key.erase(is_index); | key.erase(is_index); | ||||
} | } | ||||
#ifdef WIN32 | #ifdef WIN32 | ||||
std::transform(key.begin(), key.end(), key.begin(), ToLower); | key = ToLower(key); | ||||
if (key[0] == '/') { | if (key[0] == '/') { | ||||
key[0] = '-'; | key[0] = '-'; | ||||
} | } | ||||
#endif | #endif | ||||
if (key[0] != '-') { | if (key[0] != '-') { | ||||
return false; | return false; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 986 Lines • Show Last 20 Lines |