List of utility methods to do List Implode
String | implode(String glue, List Joins a list of items to a single string using "glue" as separator If the item is null, it will add as empty if (list == null || list.isEmpty()) { return ""; StringBuilder sb = new StringBuilder(); boolean addGlue = false; for (T item : list) { if (addGlue) { sb.append(glue); ... |
String | implode(String split, List> list) implode return implode(split, list, "", ""); |
String | implodeList(final List> list, final String glue) Implode a list of values (Like php's implode) final StringBuilder builder = new StringBuilder(); for (final Iterator<?> it = list.iterator(); it.hasNext();) { builder.append(it.next()); if (it.hasNext()) { builder.append(glue); return builder.toString(); ... |