Android List Join join(List list, String glue)

Here you can find the source of join(List list, String glue)

Description

join

License

Open Source License

Declaration

public static String join(List<String> list, String glue) 

Method Source Code

//package com.java2s;

import java.util.List;

public class Main {
    public static String join(List<String> list, String glue) {
        return join(list.toArray(new String[0]), glue);
    }// ww w.  ja v a 2s  . c o m

    public static String join(String[] s, String glue) {
        int k = s.length;
        if (k == 0)
            return null;
        StringBuilder out = new StringBuilder();
        out.append(s[0]);
        for (int x = 1; x < k; ++x)
            out.append(glue).append(s[x]);
        return out.toString();
    }
}

Related

  1. join(List list, String separator, boolean ignoreNull)
  2. join(List list, String separator)
  3. join(List strList, String separator)
  4. join(List list, String separator)
  5. join(List s, String delimiter)
  6. implode(List strings, String glue)
  7. join(List texts, String separator)
  8. join(String separator, List data)