Function find_first_null

Source
pub fn find_first_null(bytes: &[u8]) -> usize
Expand description

Finds the index of the first null byte (\0) in the given slice.

Returns the index of the first null byte, or the full length of the slice if no null is found.