Reference for Processing (BETA) version 131+. If you have a previous version, use the reference included with your software. If you see any errors or have any comments, let us know.
| Name |
contract() |
| Examples |
int[] ia = {0, 1, 2, 3, 4, 5, 6, 7};
println(ia.length); // Prints "8"
ia = contract(ia, 5);
println(ia.length); // Prints "5"
ia = subset(ia, 0, 5);
println(ia.length); // Prints "5" |
| Description |
This function has been removed starting in revision 0124. Use subset() instead.
Decreases the size of an array. The required newSize parameter provides precise control over the decrease in size. |
| Syntax |
contract(array, newSize) |
| Parameters |
| array |
booleans[], bytes[], chars[], ints[], floats[], or Strings[] |
| newSize |
positive int: new size for the array |
|
| Usage |
Web & Application |
| Related |
expand()
|
Updated on May 24, 2007 06:11:18pm PDT