Downsizes the vector to a length of n elements.
If n is smaller than the current vector length, the current value is shortened to its first n character, removing the characters beyond the nth.
If n is greater than the current vector length, then nothing happend.
Vector!(int, 6) vec = Vector!(int, 6).build(1, 2, 3); vec.downsize(5); assert(vec == [1, 2, 3]); vec.downsize(2); assert(vec == [1, 2]);
See Implementation
Downsizes the vector to a length of n elements.
If n is smaller than the current vector length, the current value is shortened to its first n character, removing the characters beyond the nth.
If n is greater than the current vector length, then nothing happend.