a port of the Processing Visualization Language
Name

concat()

Examples
String[] sa1 = { "OH ", "NY ", "CA "};
String[] sa2 = { "KY ", "IN ", "MA "};
String[] sa3 = concat(sa1, sa2);
println(sa3);  // Prints OH, NY, CA, KY, IN, MA
Description

Concatenates two arrays. For example, concatenating the array { 1, 2, 3 } and the array { 4, 5, 6 } yields { 1, 2, 3, 4, 5, 6 }. Both parameters must be arrays of the same datatype.

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[]) concat(array1, array2).

Syntax
concat(array1,array2)
Parameters
array1, array2 boolean[], byte[], char[], int[], float[], String[], or an array of objects
Returns Array (the same datatype as the input)
Usage Web & Application
Related splice()

This reference is licensed under the CC BY-NC-SA 2.0 license:

Creative Commons License
Fork me on GitHub