fn find(array: &[u8], subseq: &[u8]) -> Option<usize> {
            for i in 0..array.len() - subseq.len() + 1 {
                if array[i..i + subseq.len()] == subseq[..] {
                    return Some(i);
                }
            }
            None
        }
// A sub-sequence search function
A sub-sequence search function
A sub - sequence search function
fn find(array: &[u8], subseq: &[u8]) -> Option<usize> {
            for i in 0..array.len() - subseq.len() + 1 {
                if array[i..i + subseq.len()] == subseq[..] {
                    return Some(i);
                }
            }
            None
        }
fn find ( array : & [ u8 ] , subseq : & [ u8 ] ) -> Option < usize > { for i in 0 .. array . len ( ) - subseq . len ( ) + 1 { if array [ i .. i + subseq . len ( ) ] == subseq [ .. ] { return Some ( i ) ; } } None }
A sub-sequence search function
A sub - sequence search function
array
&[u8]
subseq
&[u8]
array
&[u8]
subseq
&[u8]