ArrayResize()
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.
ArrayResize( array=array, minimum_size=number );
Returns: Boolean
| Argument | Description |
|---|---|
|
array
array,
required
|
edit
Name of an array |
|
minimum_size
number,
required
|
edit
minimum size of the array Alias: minimum, size |
Examples
editSets a minimum number of array items for an array
Fills the unset array items with null
numbers = [ 1, 2, 3, 4 ];
arrayResize(numbers,10);
Dump( numbers );
//member function
numbers.resize(15);
Dump( numbers );
See also
- Arrays
- array.resize()
- Search Issue Tracker open_in_new
- Search Lucee Test Cases open_in_new (good for further, detailed examples)