MCPcopy Create free account
hub / github.com/KuhakuPixel/AceTheGame / ArrayConcat

Method ArrayConcat

Modder/modder/src/main/java/modder/Util.java:15–24  ·  view source on GitHub ↗
(T[] a, T[] b)

Source from the content-addressed store, hash-verified

13public class Util {
14
15 public static <T> T[] ArrayConcat(T[] a, T[] b) {
16 if (a == null || b == null)
17 return null;
18 // allocate enough space for both a and b
19 T[] combined = Arrays.copyOf(a, a.length + b.length);
20 //
21 int destPos = a.length;
22 System.arraycopy(b, 0, combined, destPos, b.length);
23 return combined;
24 }
25
26 public static boolean DoesCommandExist(String command) {
27

Callers 1

ArrayConcatMethod · 0.95

Calls

no outgoing calls

Tested by 1

ArrayConcatMethod · 0.76