fn truncate_null(self) -> (Self, B) {
        let Self(bytes) = self;
        let split = find_null_termination(&bytes).unwrap_or(bytes.as_ref().len());
        let (bytes, rest) = bytes.split_at(split);
        (Self(bytes), rest)
    }
/// Splits this `ValidStr` into a valid string up to the first null
/// character and the rest of the internal container if there is one.
///
/// The returned `ValidStr` is guaranteed to not contain a null character,
/// and the returned tail `ByteSlice` may either be a slice starting with a
/// null character or an empty slice.
Splits this `ValidStr` into a valid string up to the first null
character and the rest of the internal container if there is one.

The returned `ValidStr` is guaranteed to not contain a null character,
and the returned tail `ByteSlice` may either be a slice starting with a
null character or an empty slice.
Splits this ` ValidStr ` into a valid string up to the first null character and the rest of the internal container if there is one . The returned ` ValidStr ` is guaranteed to not contain a null character and the returned tail ` ByteSlice ` may either be a slice starting with a null character or an empty slice .
fn truncate_null(self) -> (Self, B) {
        let Self(bytes) = self;
        let split = find_null_termination(&bytes).unwrap_or(bytes.as_ref().len());
        let (bytes, rest) = bytes.split_at(split);
        (Self(bytes), rest)
    }
fn truncate_null ( self ) -> ( Self , B ) { let Self ( bytes ) = self ; let split = find_null_termination ( & bytes ) . unwrap_or ( bytes . as_ref ( ) . len ( ) ) ; let ( bytes , rest ) = bytes . split_at ( split ) ; ( Self ( bytes ) , rest ) }
Splits this `ValidStr` into a valid string up to the first null
character and the rest of the internal container if there is one.
Splits this ` ValidStr ` into a valid string up to the first null character and the rest of the internal container if there is one .
self
self