List of utility methods to do String Array Combine
String | combine(String[] values, String separator) combine if (values == null) return null; String result = ""; int n = values.length; for (int i = 0; i < n; ++i) { result += values[i] + (i < n - 1 ? separator : ""); return result; ... |
String | combine(String[] words) combine String str = ""; for (String word : words) { str = str + word; return str; |
String | combineArray(String separator, String... stringArray) Combines a set of strings into a single string, separated by the given character set return combineArray(0, separator, stringArray);
|
String[] | combineArray(String[] a, String[] b) combine Array String[] c = new String[a.length + b.length]; System.arraycopy(a, 0, c, 0, a.length); System.arraycopy(b, 0, c, a.length, b.length); return c; |
String | combineArray(String[] args) combine Array String tmp = ""; for (String str : args) tmp += str + " "; return tmp.substring(0, tmp.length() - 1); |
String | combineArray(String[] array, int offset) Combines the parts of a string array into a statement seperated by spaces String combination = ""; for (int i = offset; i < array.length; i++) { combination += (array[i] + " "); return combination; |
String | combineArray(String[] str, int start, int end) combine Array String oString = ""; for (int i = start; i < end; i++) { oString += str[i] + " "; return oString.trim(); |
String[] | combineArrays(String[] array1, String[] array2) combine Arrays String[] array = new String[array1.length + array2.length]; System.arraycopy(array1, 0, array, 0, array1.length); System.arraycopy(array2, 0, array, array1.length, array2.length); return array; |
String | combineSplit(final int startIndex, final String[] string, final String seperator) Turns a String[] into a single String separated by the passed separator. if (startIndex + 1 > string.length) { return ""; final StringBuilder builder = new StringBuilder(); for (int i = startIndex; i < string.length; i++) { builder.append(string[i]); builder.append(seperator); builder.deleteCharAt(builder.length() - seperator.length()); return builder.toString(); |
String | combineSplit(int startIndex, String[] string, String separator) combine Split if (string == null) { return ""; } else { StringBuilder builder = new StringBuilder(); for (int i = startIndex; i < string.length; i++) { builder.append(string[i]); builder.append(separator); builder.deleteCharAt(builder.length() - separator.length()); return builder.toString(); |