Function sway_core::extract_keyword[][src]

pub fn extract_keyword(line: &str, rule: Rule) -> Option<&str>
Expand description

If a given Rule exists in the input text, return that string trimmed. Otherwise, return None. This is typically used to find keywords.