nautilus_core::ffi::string

Function cstr_to_bytes

Source
pub unsafe fn cstr_to_bytes(ptr: *const c_char) -> Vec<u8>
Expand description

Convert a C string pointer into bytes.

§Safety

  • Assumes ptr is a valid C string pointer.

§Panics

This function panics:

  • If ptr is null.