pub fn parse_priority_header(input: &str) -> PriorityHeaderIter<'_> ⓘ
Expand description
Parses the value of a header that has values with priorities. Suitable for
Accept-*
, TE
, etc.
§Example
use rouille::input::parse_priority_header;
let mut iter = parse_priority_header("text/plain, image/png; q=1.5");
assert_eq!(iter.next().unwrap(), ("text/plain", 1.0));
assert_eq!(iter.next().unwrap(), ("image/png", 1.5));
assert_eq!(iter.next(), None);