List of utility methods to do String Array Join
String | join(String[] array, String separator, boolean ignoreNull) join return join(Arrays.asList(array), separator, ignoreNull);
|
String | join(String[] list, String sep) Split the string into an array of strings using one of the separator in 'sep'. StringBuffer buffer = new StringBuffer(list[0]); int len = list.length; for (int i = 1; i < len; i++) { buffer.append(sep).append(list[i]); return buffer.toString(); |
String | toString(String[] arr, String delimiter) to String if (arr == null || arr.length == 0) { return ""; if (delimiter == null) { delimiter = ","; StringBuffer result = new StringBuffer(); result.append(arr[0]); ... |
String | join(String[] strArray, char separator) join StringBuilder sb = new StringBuilder(); if (strArray != null) { boolean isFirst = true; for (int i = 0; i < strArray.length; i++) { if (isFirst) { isFirst = false; } else { sb.append(separator); ... |