pub fn memrchr(buf: &[u8], c: u8) -> Option<usize>
This mimics libc::memrchr(), same as buf.iter().rposition(|&x| x == c).
libc::memrchr()
buf.iter().rposition(|&x| x == c)