array.resize()

edit

Resets an array to a specified minimum number of elements. This can improve performance, if used to size an array to its expected maximum. For more than 500 elements, use ArrayResize immediately after using the ArrayNew tag.

array.resize( minimum_size=number )

Returns: Array

Argument Description
minimum_size
number, required
edit

minimum size of the array

Alias: minimum, size

Examples

edit
	myarray = ["one","two","three","TWO","five","Two"];
	res = myarray.resize(4);
	writedump(res);
	res = myarray.resize(8);
	writedump(res);

See also