List of utility methods to do Array Join
String | join(String[] strings, String separator) Join all strings into a new concatenated string. return join(Arrays.asList(strings), separator, false, false);
|
String | join(String[] strings, String seperator) join String result = ""; for (String string : strings) { if (result.length() > 0) result += seperator; result += string; return result; |
String | join(String[] strParts, String glue) join StringBuilder str = new StringBuilder(); for (int i = 0; i < strParts.length; i++) { str.append(strParts[i]).append(glue); if (str.length() > 0) str.delete(str.length() - glue.length(), str.length()); return str.toString(); |
String | join(String[] strs) join StringBuilder buf = new StringBuilder(); for (int i = 0; i < strs.length; i++) { if (i > 0) { buf.append(","); buf.append(strs[i]); return buf.toString(); ... |
String | join(String[] strs, String glue, int start, int end) join String ret; int i; if (start >= strs.length) return null; if (end > strs.length) end = strs.length; ret = strs[start]; for (i = start + 1; i < end; i++) ... |
String | join(String[] tokens, String delimiter) join if (tokens == null) { return "null"; if (tokens.length == 0) { return ""; StringBuilder sb = new StringBuilder(); sb.append(tokens[0]); ... |
String | join(String[] tokens, String separator) Join all tokens dividing by a separator StringBuilder history = new StringBuilder(); if (tokens.length > 0) { history.append(tokens[0]); for (int i = 1; i < tokens.length; i++) { history.append(separator).append(tokens[i]); return history.toString(); ... |
String | join(String[] x) Join into string StringBuilder sb = new StringBuilder(); for (String token : x) { sb.append(token).append(" "); return sb.toString().trim(); |
String[] | join(String[]... arrays) join int size = 0; for (String[] array : arrays) { size += array.length; java.util.List<String> list = new java.util.ArrayList<String>(size); for (String[] array : arrays) { list.addAll(java.util.Arrays.asList(array)); return list.toArray(new String[size]); |
String[] | join(String[]... values) join List<String> list = new ArrayList<String>(); for (String[] strings : values) Collections.addAll(list, strings); return list.toArray(new String[list.size()]); |