fn shrinkAndFree(self: *Self, gpa: Allocator, new_len: usize) void

Attempt to reduce allocated capacity to new_len. If new_len is greater than zero, this may fail to reduce the capacity, but the data remains intact and the length is updated to new_len.

Parameters

self: *Self,
gpa: Allocator,
new_len: usize,