Java String Array to String ArrayCombine(String[] array, String delimiter)

Here you can find the source of ArrayCombine(String[] array, String delimiter)

Description

Array Combine

License

Creative Commons License

Declaration

public static String ArrayCombine(String[] array, String delimiter) 

Method Source Code

//package com.java2s;
/* Authors: Xaymar// ww w .  java  2 s . c  o m
 * Copyright: 2012-2013 (c) Inception Plugin Team.
 * License: CC BY-SA 3.0
 *      Inception by Inception Plugin Team is licensed under a
 *      Creative Commons Attribution-ShareAlike 3.0 Unported
 *      License.
 */

public class Main {
    public static String ArrayCombine(String[] array, String delimiter) {
        String output = "";
        for (String word : array) {
            output += (output.isEmpty() ? "" : delimiter) + word;
        }
        return output;
    }
}

Related

  1. array2str(String[] arrayname, int length)
  2. array2string(String array[])
  3. array2string(String[] s)
  4. arrayAsString(String[] haystack)
  5. arrayAsString(String[] stringArray)
  6. arrayStringToArrayInt(final String[] as)
  7. arrayStringtoString(final String[] arrayString)
  8. arrayStringToString(String[] args)