constructor for given length
constructor for given length and init
constructor that gets content from arbitrary range
destructor
post-blit that does a full copy
convenience alias for pushBack
sets the size and fills everything with one value
last element, same as this[$-1]
number of elements this structure can hold without further allocations
remove all content but keep allocated memory (same as resize(0))
check for emptiness
first element, same as this[0]
insert new element at given location. moves all elements behind
number of elements
number of elements
indexing
default range
subrange
assign all elements to the same value
returns removed element
pointer to the first element
add some new element to the back
add multiple new elements to the back
remove i'th element. moves all elements behind
make sure this structure can contain given number of elements without further allocs
sets the size to some value. Either cuts of some values (but does not free memory), or fills new ones with V.init
convert to string
Array of dynamic size.
If you add elements, new memory will be allocated automatically as needed. Typically there is more memory allocated than is currently in use. There is a tradeoff between wasted space and frequency of reallocations. The default behaviour is to double the capacity every time the allocated memory is filled up. This ensures that pushBack takes O(1) in amortized time. If you know the number of elements in advance, you can use reserve to avoid reallocations, but this is just an optimization and never necessary.