List of utility methods to do Array to String
String | arrayToString(Object[] array) array To String return arrayToString(array, ","); |
String | arrayToString(Object[] array) Converts an array of objects to a string by inserting a space between each element. String result = ""; if (array == null) { result = "<null>"; } else { for (Object element : array) { if (element == null) { result += " ?"; } else { ... |
String | arrayToString(Object[] array) array To String if (array == null) { return ""; StringBuilder sb = new StringBuilder(); sb.append("["); for (Object obj : array) { sb.append(obj == null ? "" : obj.toString()); sb.append(","); ... |
String | arrayToString(Object[] array) Returns a string representation of an array of Objects. ArrayList arrayList = new ArrayList(); for (int i = 0; i < array.length; ++i) { arrayList.add(array[i]); return arrayList.toString(); |
String | arrayToString(Object[] array) Take an array of anything and turn it into a string StringBuilder result = new StringBuilder(); if (array != null && array.length > 0) { for (int i = 0; i < array.length; i++) { if (i > 0) { result.append(","); if (array[i] != null) { result.append(array[i].toString()); ... |
String | ArrayToString(Object[] array, String conv) Array To String String strReturn = ""; int length = array.length; if (length > 0) { for (int i = 0; i < length - 1; i++) { strReturn += array[i].toString() + conv; strReturn += array[length - 1].toString(); return strReturn; |
String | arrayToString(Object[] array, String delim, int maxValues, boolean useBrackets) array To String return arrayToString(array, delim, maxValues, useBrackets, true);
|
String | arrayToString(Object[] array, String prefix, String suffix, String separator) array To String return listToString(arrayToList(array), prefix, suffix, separator);
|
String | arrayToString(Object[] array, String sep) Converts an array to a string using the specified separator string. StringBuilder bld = new StringBuilder(); appendArray(bld, array, sep); return bld + ""; |
String | arrayToString(Object[] array, String separator) Converts an array of objects to a string. if (array == null || array.length < 1) return null; if (array.length > 1) { StringBuilder buf = new StringBuilder(); for (int i = 0; i < array.length; i++) { if (i > 0 && separator != null) buf.append(separator); buf.append(array[i]); ... |