MCPcopy Index your code
hub / github.com/benfry/processing4 / shorten

Method shorten

core/src/processing/core/PApplet.java:7782–7784  ·  view source on GitHub ↗

Decreases an array by one element and returns the shortened array. When using an array of objects, the data returned from the function must be cast to the object array's data type. For example: SomeClass[] items = (SomeClass[]) shorten(originalArray) . @webref data:array functio

(boolean[] list)

Source from the content-addressed store, hash-verified

7780 * @see PApplet#expand(boolean[])
7781 */
7782 static public boolean[] shorten(boolean[] list) {
7783 return subset(list, 0, list.length-1);
7784 }
7785
7786 static public byte[] shorten(byte[] list) {
7787 return subset(list, 0, list.length-1);

Callers 1

removeCodeMethod · 0.95

Calls 1

subsetMethod · 0.95

Tested by

no test coverage detected