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

Shortens a vector, keeping the first len elements.

Note

This function does nothing if vec.len is less than or equal to len.

Parameters:

  • NSTDVec *vec - The vector to truncate.

  • NSTDUInt len - The number of elements to keep.