List of utility methods to do Array to String
String | arrayToString(Object[] arr) array To String StringBuffer buf = new StringBuffer(); buf.append('['); for (int i = 0; i < arr.length; i++) { if (i != 0) buf.append(", "); buf.append(arr[i].toString()); buf.append(']'); ... |
String | arrayToString(Object[] arr) Converts the specified array into a string by appending all its elements separated by a semicolon. StringBuffer buf = new StringBuffer(); for (int i = 0; i < arr.length; i++) { buf.append(arr[i]); buf.append("; "); if (arr.length > 0) buf.setLength(buf.length() - 2); return buf.toString(); ... |
String | arrayToString(Object[] arr, String split) array To String if (isEmpty(split)) { split = ", "; StringBuilder buf = new StringBuilder(); if (arr != null && arr.length > 0) { buf.append(arr[0]); for (int i = 1; i < arr.length; i++) { buf.append(split).append(arr[i]); ... |
String | arrayToString(Object[] array) Convert array contents to string. String result = ""; if ((array != null) && (array.length > 0)) { for (int i = 0; i < array.length; i++) { Object value = array[i]; if (i > 0) result = result + ", "; if (value == null) { result = result + "null"; ... |
String | arrayToString(Object[] array) array To String if (null != array) { if (array.length == 1) { return array[0].toString(); StringBuilder builder = new StringBuilder(); for (int i = 0; i < array.length; i++) { if (i > 0) { builder.append(","); ... |
String | arrayToString(Object[] array) array To String return arrayToString(array, DEFAULT_SEPARATOR);
|
String | arrayToString(Object[] array) Convert an array object to string, the component of the array should have a public method toString() if (null == array) return null; StringBuffer s = new StringBuffer(); for (int i = 0; i < array.length; i++) s.append(array[i].toString()); return s.toString(); |
String | arrayToString(Object[] array) Converts the specified array to a string. if (array == null) { return NULL_STR; if (array.length == 0) { return "[]"; } else if (array.length == 1) { return "[" + array[0] + "]"; } else { ... |
String | arrayToString(Object[] array) Returns a comma-delimited string representation of the specified array, with []s. return arrayToString(array, ", ", -1); |
String | arrayToString(Object[] array) Print out an array as a String return arrayToString(array, ','); |