We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
CString::from_vec_unchecked
1 parent 8a12be7 commit dd0b5f4Copy full SHA for dd0b5f4
library/std/src/ffi/c_str.rs
@@ -409,6 +409,8 @@ impl CString {
409
/// Creates a C-compatible string by consuming a byte vector,
410
/// without checking for interior 0 bytes.
411
///
412
+ /// Trailing 0 byte will be appended by this function.
413
+ ///
414
/// This method is equivalent to [`CString::new`] except that no runtime
415
/// assertion is made that `v` contains no 0 bytes, and it requires an
416
/// actual byte vector, not anything that can be converted to one with Into.
0 commit comments