Android List Join toCommaSeperatedList(List values)

Here you can find the source of toCommaSeperatedList(List values)

Description

to Comma Seperated List

Declaration

public static String toCommaSeperatedList(List<String> values) 

Method Source Code

//package com.java2s;
import java.util.List;

public class Main {
    public static String toCommaSeperatedList(List<String> values) {
        StringBuilder result = new StringBuilder();
        for (String string : values) {
            result.append(",").append(string);
        }//from   w  ww  .  j a v  a  2  s. com
        return result.toString().replaceFirst(",", "");
    }
}

Related

  1. join(List s, String delimiter)
  2. implode(List strings, String glue)
  3. join(List texts, String separator)
  4. join(String separator, List data)
  5. concatenate(List elements, String delimiter)
  6. implode(List list, String glue)
  7. joinList(String seperator, List list)
  8. joinList(String seperator, List list, String def)