package io.nub.core.util;

import java.util.Arrays;

/**
 * @author Nektro
 */
public class Arrays2
{
	public static String toString(Object[][] a)
	{
		if (a == null)
			return "null";

		int iMax = a.length - 1;
		if (iMax == -1)
			return "[]";

		StringBuilder b = new StringBuilder();
		b.append('[');
		for (int i = 0;; i++) {
			b.append(Arrays.toString(a[i]));
			if (i == iMax)
				return b.append(']').toString();
			b.append(", ");
		}
	}

	public static int[] valueOf(String[] objects)
	{
		int[] a = new int[objects.length];
		for (int i = 0; i < objects.length; i++)
			a[i] = Integer.valueOf(objects[i]);
		return a;
	}

	public static Character[] toCharacterArray(char[] charArray) {
		Character[] ca = new Character[charArray.length];
		for (int i = 0; i < ca.length; i++)
			ca[i] = charArray[i];
		return ca;
	}
}

@@ -659,41 +659,26 @@
 r%5B%5D 
-toCharacterArray(char%5B%5D charArray
+valueOf(char%5B%5D arr
 ) %7B%0A
@@ -710,25 +710,182 @@
 aracter%5B
-charArray
+arr.length%5D;%0A%09%09for (int i = 0; i %3C ca.length; i++)%0A%09%09%09ca%5Bi%5D = arr%5Bi%5D;%0A%09%09return ca;%0A%09%7D%0A%09%0A%09public static Integer%5B%5D valueOf(int%5B%5D arr) %7B%0A%09%09Integer%5B%5D ca = new Integer%5Barr
 .length%5D
@@ -939,17 +939,11 @@
 %5D = 
-charArray
+arr
 %5Bi%5D;

add int to Integer utility