string_array

Function string_array 

Source
pub unsafe fn string_array(
    ptr: *const *const c_char,
) -> Result<Vec<CString>, ParseError>
Expand description

Parses a null-terminated C string array into a Vec for safe usage.

Returns an Err if given a null pointer.

ยงSegfaults

Can cause the program to crash if the pointer array starting at ptr is not correctly null terminated. Likewise, if any string pointed to is not properly null-terminated it may crash.