We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 403e221 + dd0b5f4 commit e392f5dCopy full SHA for e392f5d
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