find_first

Function find_first 

Source
pub fn find_first(
    values: Vec<(String, String)>,
    pattern: &str,
) -> Option<(String, String)>
Expand description

Return fisrt key/value pair with key that matches pattern

ยงExample

use acorn_lib::util::find_first;

let values = vec![("foo".to_string(), "bar".to_string()), ("baz".to_string(), "qux".to_string())];
let pattern = "ba";
let result = find_first(values, pattern);
assert_eq!(result, Some(("baz".to_string(), "qux".to_string())));