Skip to main content

find_either

Function find_either 

Source
pub fn find_either(a: u8, b: u8, hay: &[u8]) -> Option<usize>
Expand description

The index of the first byte in hay that equals a or b.

ยงExamples

use parse_net::scan::find_either;

assert_eq!(find_either(b',', b'"', b"a=\"x,y\", b"), Some(2));