pub fn memrnechr(buf: &[u8], by1: u8) -> Option<usize>
This is same as buf.iter().rposition(|&x| x != by1), not included libc.
buf.iter().rposition(|&x| x != by1)