List of utility methods to do Array Implode
String | implode(double[] array, String separator) implode StringBuffer out = new StringBuffer(); boolean first = true; for (double v : array) { if (first) { first = false; } else { out.append(separator); out.append(v); return out.toString(); |
String | implode(final String[] array, final String delim) Implodes a string array into a String. return implode(array, delim, false);
|
String | implode(final String[] pStrArray) implode return implode(pStrArray, "\t"); |
String | implode(Object[] array, String separator) implode if (array == null) return null; if (array.length == 0) return ""; StringBuffer result = new StringBuffer(array[0].toString()); for (int i = 1; i < array.length; i++) { if (separator != null) result.append(separator); ... |
String | implode(Object[] ary, String delim) Glues together the array with delim inserted between elements. return implode(ary, delim, 0, ary.length);
|
String | implode(String delim, Object[] objects) This method merges an array of objects to a single string return implode(delim, Arrays.asList(objects));
|
String | implode(String delim, String[] args) implode StringBuffer sb = new StringBuffer(); for (int i = 0; i < args.length; i++) { if (i > 0) { sb.append(delim); sb.append(args[i]); return sb.toString(); ... |
String | implode(String[] array, String separator) Returns the given array joined by a separator. if (array.length == 0) { return ""; StringBuilder buffer = new StringBuilder(); for (String str : array) { buffer.append(separator); buffer.append(str); return buffer.substring(separator.length()).trim(); |
String | implode(String[] data, String glue) Converts a list of strings into a long string separated by glue. if (data == null || data.length == 0) return ""; StringBuilder sb = new StringBuilder(); int total = data.length; for (int i = 0; i < total; i++) { String item = data[i]; sb.append(item).append(glue); String result = sb.toString(); if (result.endsWith(glue)) result = result.substring(0, result.lastIndexOf(glue)); return result; |
String | implode(String[] inputArray, String glueString) Method to join array elements of type string String output = EMPTY_STRING; if (inputArray != null && inputArray.length > 0) { StringBuilder sb = new StringBuilder(); sb.append(inputArray[0]); for (int i = 1; i < inputArray.length; i++) { sb.append(glueString); sb.append(inputArray[i]); output = sb.toString(); return output; |