Android List Join join(String separator, List data)

Here you can find the source of join(String separator, List data)

Description

join

Declaration

public static String join(String separator, List<String> data) 

Method Source Code

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

public class Main {
    public static String join(String separator, List<String> data) {
        StringBuilder sb = new StringBuilder();
        for (String item : data) {
            if (sb.length() > 0)
                sb.append(separator);//from  w w  w.  j av  a2 s . c  om
            sb.append(item);
        }
        return sb.toString();
    }
}

Related

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