lossy_str_from_array

Function lossy_str_from_array 

pub fn lossy_str_from_array(array: &[c_char]) -> Cow<'_, str>
Expand description

Converts a C-style array string to a Rust string on a best-effort basis.

This function respects null terminators, but doesn’t enforce them. If array is not null-terminated, it will return the entire buffer as a string.