read_word

Function read_word 

Source
fn read_word(s: &str) -> Result<Option<(&str, &str)>, BrokenQuote>
Expand description

Read the next word in a OpenWRT config line. Strip any surrounding quotation marks.

Returns

  • a tuple Some((word, remaining_line)) if found,
  • None if the line is exhausted, or
  • Err(BrokenQuote) if the line could not be parsed.