The list of methods to do Array From are organized into topic(s).
String[]
arrayFromList(String aList) Function arrayFromList Given a comma seperated list, possibly within brackets this function will return all the comma seperated items as an array from strings
String aS1 = aList.replaceAll("[\\s\"\'\\]\\[]+", "");
String[] aV = aS1.split(",");
return aV;
String[]
arrayFromString(String s) array From String
if (s == null)
return new String[] {};
if (!s.startsWith("[") || !s.endsWith("]"))
throw new IllegalArgumentException();
if (s.length() == 2)
return new String[] {};
return s.substring(1, s.length() - 1).split(" *, *");
String[]
arrayFromString(String str) array From String
if ((str != null) && (str.length() > 0)) {
return str.split("[ ,;]");
} else {
return null;
Boolean[]
toArray(boolean[] array) to Array
Boolean[] newArray = new Boolean[array.length];
for (int i = 0; i < array.length; i++) {
newArray[i] = Boolean.valueOf(array[i]);
return newArray;
boolean[]
toArray(CharSequence input) Translates a
String of zero ('0') and one ('1') characters to an array of
boolean.
int len = input.length();
boolean[] bools = new boolean[len];
for (int i = 0; i < len; i++) {
bools[i] = (input.charAt(i) == '1');
return bools;
double[]
toArray(Double[] array) to Array
if (array == null) {
return null;
double[] data = new double[array.length];
for (int i = 0; i < array.length; i++) {
double val = (array[i] == null) ? 0 : array[i].intValue();
data[i] = val;
return data;