copy_cstr_to_string

Function copy_cstr_to_string 

Source
pub unsafe fn copy_cstr_to_string(ptr: *const u8) -> Result<String, ()>
Expand description

从以 NULL 结尾的 C 字符串指针拷贝并返回一个 owned String WARNING: 这个函数直接读取指针,调用者必须保证指针在内核可读