Function collections::string::raw::from_partsDeprecated
[-]
[+]
[src]
pub unsafe fn from_parts(buf: *mut u8, length: uint, capacity: uint) -> String
Creates a new String
from a length, capacity, and pointer.
This is unsafe because:
* We call Vec::from_raw_parts
to get a Vec<u8>
;
* We assume that the Vec
contains valid UTF-8.