List of utility methods to do Array Join
String | join(String sep, final String[] strings) join if (strings == null) { return null; final int length = strings.length; if (length == 0) { return STR_EMP; final int sepLen; ... |
String | join(String sep, Object[] os) join return join(sep, Arrays.asList(os));
|
String | join(String sep, String[] a) join if (a.length == 0) return ""; if (a.length == 1) return a[0]; StringBuffer sbuff = new StringBuffer(); sbuff.append(a[0]); for (int i = 1; i < a.length; i++) { if (sep != null) ... |
String | join(String sep, String[] arr) Join an array of Strings using given separator if (arr == null) return null; StringBuilder str = new StringBuilder(); for (int i = 0; i < arr.length; i++) str.append(i == 0 ? arr[i] : sep + arr[i]); return str.toString(); |
String | join(String separator, String... array) join return join(separator, Arrays.asList(array));
|
String | join(String separator, String[] strings) join an array of strings given a seperator return join(separator, strings, 0, strings.length);
|
String | join(String separator, String[] strings) join an array of strings given a seperator return join(separator, strings, 0, strings.length);
|
String | join(String[] a, String delimiter, Integer startIndex) join try { Collection<String> s = Arrays.asList(a); StringBuffer buffer = new StringBuffer(); Iterator<String> iter = s.iterator(); while (iter.hasNext()) { if (startIndex == 0) { buffer.append(iter.next()); if (iter.hasNext()) { ... |
String[] | join(String[] a, String[] b) join String[] temp = new String[a.length + b.length]; System.arraycopy(a, 0, temp, 0, a.length); System.arraycopy(b, 0, temp, a.length, b.length); Arrays.sort(temp); return temp; |
String[] | join(String[] a1, String[] a2) join List<String> result = new ArrayList<>(); result.addAll(Arrays.asList(a1)); result.addAll(Arrays.asList(a2)); return result.toArray(new String[0]); |