List of utility methods to do Collection Join
String | join(Collection Join elements of a String collection into a single string. StringBuilder list = new StringBuilder(); boolean first = true; for (String type : items) { if (!first) { list.append(join); list.append(type); first = false; ... |
String | join(Collection join StringBuilder sb = new StringBuilder(); sb.append(prefix); for (String item : items) { sb.append(itemPrefix).append(item).append(itemSuffix); sb.append(suffix); return sb.toString(); |
String | join(Collection join StringBuilder sb = new StringBuilder(); for (String s : list) { sb.append(s).append(' '); if (sb.length() > 0) { sb.deleteCharAt(sb.length() - 1); return sb.toString(); ... |
String | join(Collection join StringBuilder sb = new StringBuilder(); if (conjunction == null) { conjunction = ", "; if (list != null && !list.isEmpty()) { for (String string : list) { sb.append(string).append(conjunction); sb.setLength(sb.length() - conjunction.length()); return sb.toString(); |
String | join(Collection join final StringBuilder s = new StringBuilder(); for (final String pack : sorted(packs)) { s.append(", ").append(pack); return s.length() > 0 ? s.substring(2) : s.toString(); |
String | join(Collection join return join(s, delimiter, false);
|
String | join(Collection Join a collection of objects into a single string string separated by a delimiter if (s.isEmpty()) return ""; Iterator<String> iter = s.iterator(); StringBuffer buffer = new StringBuffer(iter.next()); while (iter.hasNext()) buffer.append(delimiter).append(iter.next()); return buffer.toString(); |
String | join(Collection join StringBuilder sb = new StringBuilder(); boolean first = true; for (String s : src) { if (first) { first = false; } else { sb.append(delim); sb.append(s); return sb.toString(); |
String | join(Collection Joins a Collection of strings into a single string, inserting a space between each one. return join(strings, " "); |
String | join(Collection Joins a Collection of String s in a single String using delimiter between each String .
StringBuffer buffer = new StringBuffer(); Iterator<String> iter = strings.iterator(); while (iter.hasNext()) { buffer.append(iter.next()); if (iter.hasNext()) { buffer.append(delimiter); return buffer.toString(); |