usecore::ffi::CStr;#[inline(always)]///This always rely on the fact that most common libraries return static strings.
///If that's not the case, do not use this function
pubfnconvert_c_str(ptr:*consti8)->Option<&'staticstr>{if ptr.is_null(){returnNone;}else{let text =unsafe{CStr::from_ptr(ptr)};
text.to_str().ok()}}