pub(crate) fn write_c_str_slice_with_nul( target: &mut [c_char], str: &CStr, ) -> Result<(), CStrTooLargeForStaticArray>