Inserts a value or an array of values into an existing array. The first two parameters must be arrays of the same datatype. The first parameter specifies the initial array to be modified, and the second parameter defines the data to be inserted. The third parameter is an index value which specifies
(boolean[] list,
boolean value, int index)
| 7835 | * @see PApplet#subset(boolean[], int, int) |
| 7836 | */ |
| 7837 | static final public boolean[] splice(boolean[] list, |
| 7838 | boolean value, int index) { |
| 7839 | boolean[] outgoing = new boolean[list.length + 1]; |
| 7840 | System.arraycopy(list, 0, outgoing, 0, index); |
| 7841 | outgoing[index] = value; |
| 7842 | System.arraycopy(list, index, outgoing, index + 1, |
| 7843 | list.length - index); |
| 7844 | return outgoing; |
| 7845 | } |
| 7846 | |
| 7847 | static final public boolean[] splice(boolean[] list, |
| 7848 | boolean[] value, int index) { |
no test coverage detected