Here you can find the source of mergerBy(String[] target, String seperator)
public static String mergerBy(String[] target, String seperator)
//package com.java2s; //License from project: Apache License import java.util.List; public class Main { public static String mergerBy(List<String> target, String seperator) { return mergerBy(convertListToArray(target), seperator); }/*from w w w . ja v a 2 s .c o m*/ public static String mergerBy(String[] target, String seperator) { if (null == target) { return null; } StringBuilder sb = new StringBuilder(256); for (String str : target) { sb.append(str); sb.append(seperator); } return sb.substring(0, sb.lastIndexOf(seperator)); } public static String[] convertListToArray(List<String> list) { return list.toArray(new String[0]); } }