Java Array Merge mergeStringArray(String[] array, String seperator)

Here you can find the source of mergeStringArray(String[] array, String seperator)

Description

merge String Array

License

Open Source License

Declaration

public static StringBuilder mergeStringArray(String[] array, String seperator) 

Method Source Code

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

public class Main {
    public static StringBuilder mergeStringArray(String[] array, String seperator) {
        StringBuilder output = new StringBuilder("");
        if (array != null && array.length > 0) {
            output.append(array[0]);//from www  .  j  a  v a2  s.c  o  m
            for (int i = 1; i < array.length; i++) {
                output.append(seperator).append(array[i]);
            }
        }
        return output;
    }
}

Related

  1. mergeSort(Object[] src, Object[] dest, int low, int high, int off)
  2. mergeSort(Object[] src, Object[] dest, int low, int high, int off, Comparator c)
  3. mergeSortArrays(String[][] arrayArray)
  4. mergeSortedInc(long[] a, long[] b)
  5. mergeStringArray(String[] array)
  6. mergeStringArray(String[] ary1, String[] ary2)
  7. mergeStringArray(String[] inp1, String[] inp2)
  8. mergeStringArray(String[] input)
  9. mergeStringArrayFromIndex(String[] arrayString, int i)