Not really. The into_string
is a method only on CString
and it does not perform a deep copy (and probably will result in crash on drop if you constructed the CString
from raw parts). The to_str+to_owned
on the other hand works on CStr
and will perform a deep copy and return a regular String allocated by Rust.