nstd_vec_set_len

Function nstd_vec_set_len 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn nstd_vec_set_len( vec: &mut NSTDVec<'_>, len: NSTDUInt, )
Available on crate feature vec only.
Expand description

Sets a vectors length.

§Parameters:

  • NSTDVec *vec - The vector.

  • NSTDUInt len - The new length for the vector.

§Safety

  • If len is greater than the vector’s current length, care must be taken to ensure that the new elements are properly initialized.

  • len’s value must not be greater than the vector’s capacity.