parse_key_value

Function parse_key_value 

Source
pub fn parse_key_value(line: &str) -> Option<(String, String)>
Expand description

What: Parse a key-value pair from a line.

Inputs:

  • line: Line containing key=value format

Output:

  • Some((key, value)) if parsing succeeds, None otherwise

Details:

  • Splits on the first = character
  • Trims whitespace from both key and value