Check the name, case insensitive and underscore insensitive if set
| 6204 | |
| 6205 | /// Check the name, case insensitive and underscore insensitive if set |
| 6206 | bool check_name(std::string name_to_check) const { |
| 6207 | std::string local_name = name_; |
| 6208 | if (ignore_underscore_) { |
| 6209 | local_name = detail::remove_underscore(name_); |
| 6210 | name_to_check = detail::remove_underscore(name_to_check); |
| 6211 | } |
| 6212 | if (ignore_case_) { |
| 6213 | local_name = detail::to_lower(name_); |
| 6214 | name_to_check = detail::to_lower(name_to_check); |
| 6215 | } |
| 6216 | |
| 6217 | if (local_name == name_to_check) { |
| 6218 | return true; |
| 6219 | } |
| 6220 | for (auto les : aliases_) { |
| 6221 | if (ignore_underscore_) { |
| 6222 | les = detail::remove_underscore(les); |
| 6223 | } |
| 6224 | if (ignore_case_) { |
| 6225 | les = detail::to_lower(les); |
| 6226 | } |
| 6227 | if (les == name_to_check) { |
| 6228 | return true; |
| 6229 | } |
| 6230 | } |
| 6231 | return false; |
| 6232 | } |
| 6233 | |
| 6234 | /// Get the groups available directly from this option (in order) |
| 6235 | std::vector<std::string> get_groups() const { |
no test coverage detected