Home
last modified time | relevance | path

Searched refs:from_bytes_with_nul (Results 1 – 1 of 1) sorted by relevance

/linux/rust/kernel/
H A Dstr.rs259 pub const fn from_bytes_with_nul(bytes: &[u8]) -> Result<&Self, CStrConvertError> { in from_bytes_with_nul() method
355 /// let cstr = CStr::from_bytes_with_nul(b"foo\0")?;
598 const C: &$crate::str::CStr = match $crate::str::CStr::from_bytes_with_nul(S.as_bytes()) {
633 let checked_cstr = CStr::from_bytes_with_nul(good_bytes)?; in test_cstr_to_str()
642 let checked_cstr = CStr::from_bytes_with_nul(bad_bytes)?; in test_cstr_to_str_invalid_utf8()
650 let checked_cstr = CStr::from_bytes_with_nul(good_bytes)?; in test_cstr_as_str_unchecked()
659 let hello_world = CStr::from_bytes_with_nul(b"hello, world!\0")?; in test_cstr_display()
661 let non_printables = CStr::from_bytes_with_nul(b"\x01\x09\x0a\0")?; in test_cstr_display()
663 let non_ascii = CStr::from_bytes_with_nul(b"d\xe9j\xe0 vu\0")?; in test_cstr_display()
665 let good_bytes = CStr::from_bytes_with_nul( in test_cstr_display()
[all...]