Skip to main content

cstr_bytes

Function cstr_bytes 

Source
pub unsafe fn cstr_bytes<'a>(s: *const c_char) -> &'a [u8]
Expand description

Borrow a NUL-terminated string as bytes, excluding the terminator. The caller must keep the string alive for the lifetime of the slice.