List of utility methods to do String Array Combine
String | combineSplit(int startIndex, String[] string, String separator) Function to combine a String[] into a String final StringBuilder builder = new StringBuilder(); for (int i = startIndex; i < string.length; i++) { builder.append(string[i]); builder.append(separator); builder.setLength(builder.length() - separator.length()); return builder.toString(); |
String | combineSplit(int startIndex, String[] string, String separator) Combines a set of strings into a single string, separated by the given character set return combineArray(startIndex, separator, string);
|
String | combineString(String[] strArr, String glue) Combine several substring into one arge String String retval = ""; for (int i = 0; i < strArr.length; i++) { retval += strArr[i]; if (i < (strArr.length - 1)) { retval += glue; return retval; ... |
String | combineStringArray(String[] array, String delim) combine String Array int length = array.length - 1; if (delim == null) { delim = ""; StringBuffer result = new StringBuffer(length * 8); for (int i = 0; i < length; i++) { result.append(array[i]); result.append(delim); ... |
String | combineStrings(Object... strings) combine Strings StringBuilder builder = new StringBuilder(); for (Object string : strings) { builder.append(string); return builder.toString(); |
String | combineStrings(Object[] list) Combine a list of strings in an Object[] into a single string.
int listLength = list.length; switch (listLength) { case 0: { return ""; case 1: { return (String) list[0]; int strLength = 0; for (int i = 0; i < listLength; i++) { strLength += ((String) list[i]).length(); StringBuilder sb = new StringBuilder(strLength); for (int i = 0; i < listLength; i++) { sb.append(list[i]); return sb.toString(); |
String | combineStrings(String[] strings) Returns a single-string of the strings for storage. if (strings.length == 0) return null; if (strings.length == 1) return strings[0]; StringBuffer buf = new StringBuffer(); for (int i = 0; i < strings.length - 1; i++) { buf.append(strings[i]); buf.append(ATTRIBUTE_SEPARATOR); ... |