List of utility methods to do String Join
String | join(String separator, String... parts) Join an arry of strings into a single using the specified delimiter. StringBuilder builder = new StringBuilder(); for (String part : parts) { if (builder.length() > 0) { builder.append(separator); builder.append(part); return builder.toString(); ... |
String | join(String separator, String... strings) todo: move to common module if (strings == null) { return null; StringBuilder sb = new StringBuilder(); for (int i = 0; i < strings.length; i++) { Object o = strings[i]; if (i > 0) { sb.append(separator); ... |
String | join(String separator, String... strings) join StringBuilder sb = new StringBuilder(); if (strings.length > 0) { sb.append(strings[0]); for (int i = 1; i < strings.length; i++) { sb.append(separator).append(strings[i]); return sb.toString(); ... |
String | join(String splitter, String... strs) join return join(splitter, Arrays.asList(strs));
|
String | join(String str[], String splitter) join StringBuilder b = new StringBuilder(); b.append(str[0]); for (int i = 1, len = str.length; i < len; i++) { b.append(splitter).append(str[i]); return b.toString().trim(); |
String | join(String... paths) join return join(SLASH_CHAR, paths);
|
String | join(String... xs) join StringBuilder sb = new StringBuilder(); for (String x : xs) sb.append(x); return sb.toString(); |
String | join(T delimiter, List join StringBuilder sb = new StringBuilder(); for (int i = 0; i < list.size(); i++) { sb.append(list.get(i)); if (i <= list.size() - 1) sb.append(delimiter); return sb.toString(); |
String | join2(String connector, String... strs) join StringBuffer sBuffer = new StringBuffer(); for (Object object : strs) { sBuffer.append(object).append(connector); if (sBuffer.length() > 0) { sBuffer.delete(sBuffer.length() - connector.length(), sBuffer.length()); return sBuffer.toString(); ... |
String | joinColumns(Iterable Joins the provided columns of data together with tab characters. return String.join("\t", columns); |