Returns the raw string value of an option, or `None` if the option was not set or if its value is an empty string (e.g. `key=`). Surrounding double-quotes in the value are removed.
(&self, option: &str)
| 242 | /// |
| 243 | /// Surrounding double-quotes in the value are removed. |
| 244 | pub fn get(&self, option: &str) -> Option<String> { |
| 245 | self.options |
| 246 | .get(option) |
| 247 | .and_then(|v| v.value.clone()) |
| 248 | .and_then(|s| { |
| 249 | if s.is_empty() { |
| 250 | None |
| 251 | } else { |
| 252 | Some(dequote(&s)) |
| 253 | } |
| 254 | }) |
| 255 | } |
| 256 | |
| 257 | /// Returns `true` if the option was present in the parsed input. |
| 258 | /// |