Here you can find the source of getCommaDelimitedString(List
Parameter | Description |
---|---|
input | List<String> |
public static String getCommaDelimitedString(List<String> input)
//package com.java2s; //License from project: Apache License import java.util.List; public class Main { /**/*from ww w . java 2s . co m*/ * Returns a comma delimited String from input list of strings. * * @param input List<String> * @return String */ public static String getCommaDelimitedString(List<String> input) { String output = ""; if (input != null && input.size() > 0) { for (String tag : input) { output += tag + ","; } output = output.substring(0, output.length() - 1); output = output.replaceAll(" ", ""); } return output; } }