Function lrs::util::memchr

Returns the first occurrence of a byte in a byte slice if any.

Syntax

fn memchr(s: &[u8], c: u8) -> Option<usize>

Arguments

NameDescription
s

The slice to be searched.

c

The byte to be searched for.

Return value

Returns the first occurrence of the byte in the slice.