Function cstring_interop::from_cstring_raw [−][src]
pub unsafe fn from_cstring_raw(cstring: *const c_char) -> String
Creates an owned String
from a given raw C string pointer.
Safety
This function assumes that the string is a valid C string with a null terminator. Passing a pointer which does not refer to such a string will result in undefined behaviour.
The function does not take responsibility for the C string after reading from it; managing allocation and lifetime is up to the caller.