--- EXISTS --- Returns whether the flag was found.
| 150 | // --- EXISTS --- |
| 151 | // Returns whether the flag was found. |
| 152 | bool Sarge::exists(std::string arg_flag) { |
| 153 | if (!parsed) { return false; } |
| 154 | |
| 155 | std::map<std::string, Argument*>::const_iterator it = argNames.find(arg_flag); |
| 156 | if (it == argNames.end()) { return false; } |
| 157 | if (!it->second->parsed) { return false; } |
| 158 | |
| 159 | return true; |
| 160 | } |
| 161 | |
| 162 | |
| 163 | // --- GET TEXT ARGUMENT --- |