Java String Array Combine combineSplit(int startIndex, String[] string, String separator)

Here you can find the source of combineSplit(int startIndex, String[] string, String separator)

Description

combine Split

License

Open Source License

Declaration

public static String combineSplit(int startIndex, String[] string, String separator) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static String combineSplit(int startIndex, String[] string, String separator) {
        if (string == null) {
            return "";
        } else {/*from  ww  w.  j  ava 2 s.com*/
            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();
        }
    }
}

Related

  1. combineArray(String[] args)
  2. combineArray(String[] array, int offset)
  3. combineArray(String[] str, int start, int end)
  4. combineArrays(String[] array1, String[] array2)
  5. combineSplit(final int startIndex, final String[] string, final String seperator)
  6. combineSplit(int startIndex, String[] string, String separator)
  7. combineSplit(int startIndex, String[] string, String separator)
  8. combineString(String[] strArr, String glue)
  9. combineStringArray(String[] array, String delim)