Java Utililty Methods String Array Combine

List of utility methods to do String Array Combine

Description

The list of methods to do String Array Combine are organized into topic(s).

Method

Stringcombine(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;
...
Stringcombine(String[] words)
combine
String str = "";
for (String word : words) {
    str = str + word;
return str;
StringcombineArray(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;
StringcombineArray(String[] args)
combine Array
String tmp = "";
for (String str : args)
    tmp += str + " ";
return tmp.substring(0, tmp.length() - 1);
StringcombineArray(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;
StringcombineArray(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;
StringcombineSplit(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();
StringcombineSplit(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();