List of utility methods to do ArrayList Implode
String | implode(ArrayList elements, String connector) implode String retValue = null; if (elements.size() > 0) { retValue = ""; int size = elements.size(); for (int i = 0; i < size; i++) { if (i > 0) { retValue += connector; retValue += elements.get(i).toString(); return retValue; |
String | implode(String glue, ArrayList implode return implode(glue, array.stream().toArray(String[]::new)); |
String | implode(String glue, ArrayList implode final int s = list.size(); StringBuilder buf = new StringBuilder(); for (int i = 0; i < s; i++) { buf.append(list.get(i)); if (i < s - 1) buf.append(glue); return buf.toString(); ... |
String | implode(String glue, ArrayList implode if (strings.isEmpty()) { return ""; StringBuilder builder = new StringBuilder(); builder.append(strings.remove(0)); for (String str : strings) { builder.append(glue); builder.append(str); ... |