| 167 | std::optional<std::string> find_option( |
| 168 | const std::unordered_map<std::string, std::string> & options, |
| 169 | std::initializer_list<std::string_view> keys) { |
| 170 | const auto match = find_option_match(options, keys); |
| 171 | return match.has_value() ? std::optional<std::string>(match->value) : std::nullopt; |
| 172 | } |
| 173 | |
| 174 | bool parse_bool_option(const std::string & value, std::string_view key) { |
| 175 | if (value == "true" || value == "1" || value == "yes" || value == "on") { |
| 176 | return true; |
| 177 | } |
| 178 | if (value == "false" || value == "0" || value == "no" || value == "off") { |
| 179 | return false; |
no test coverage detected