| 234 | } |
| 235 | |
| 236 | bool CommandLineParser::has(const std::string& keys) |
| 237 | { |
| 238 | std::map<std::string, std::vector<std::string> >::iterator it; |
| 239 | std::vector<string> keysVector; |
| 240 | |
| 241 | for(it = data.begin(); it != data.end(); it++) |
| 242 | { |
| 243 | keysVector = split_string(it->first, "|"); |
| 244 | for (size_t i = 0; i < keysVector.size(); i++) keysVector[i] = del_space(keysVector[i]); |
| 245 | |
| 246 | if (keysVector.size() == 1) keysVector.push_back(""); |
| 247 | |
| 248 | if ((del_space(keys).compare(keysVector[0]) == 0) || |
| 249 | (del_space(keys).compare(keysVector[1]) == 0)) |
| 250 | return true; |
| 251 | } |
| 252 | |
| 253 | return false; |
| 254 | } |
| 255 | |
| 256 | std::string CommandLineParser::getString(const std::string& keys) |
| 257 | { |