Method lrs::string::CString::from_bytes_unchecked

Creates a CString by wrapping a vector without checking the vector for validity.

Syntax

impl<H> CString<H>
    where H: Allocator,
{
    unsafe fn from_bytes_unchecked(bytes: Vec<u8, H>) -> CString<H>
}

Arguments

NameDescription
bytes

The vector to be wrapped.

Remarks

If the vector doesn't have exactly one null byte as its last entry, the behavior is undefined.