Function std::string::raw::from_bufDeprecated [-]  [+] [src]

pub unsafe fn from_buf(buf: *const u8) -> String

Creates a String from a null-terminated *const u8 buffer.

This function is unsafe because we dereference memory until we find the NUL character, which is not guaranteed to be present. Additionally, the slice is not checked to see whether it contains valid UTF-8