ptr_to_string

Function ptr_to_string 

Source
pub(crate) fn ptr_to_string(x: *const i8) -> String
Expand description

Converts a C string pointer to an owned Rust String.

Returns an empty string if the pointer is null. Uses lossy UTF-8 conversion to handle non-UTF-8 data gracefully.