Java String from List stringListToString(List stringList, String delim)

Here you can find the source of stringListToString(List stringList, String delim)

Description

Convert string array to string with delimeters.

License

Apache License

Declaration

public static String stringListToString(List<String> stringList,
        String delim) 

Method Source Code

//package com.java2s;

import java.util.List;

public class Main {
    /** Convert string array to string with delimeters. */
    public static String stringListToString(List<String> stringList,
            String delim) {/*from   ww w  .  j a  va 2 s.  co m*/
        StringBuilder bldr = new StringBuilder();
        for (String s : stringList) {
            if (bldr.length() > 0) {
                bldr.append(delim).append(s);
            } else {
                bldr.append(s);
            }
        }
        return bldr.toString();
    }
}

Related

  1. stringListToString(final List l, final String separator)
  2. stringListToString(List list)
  3. stringListToString(List list)
  4. stringListToString(List list, String delim)
  5. stringListToString(List ls)
  6. stringListToString(List strList, String delim)
  7. stringsAsBytes(List strs)
  8. stringToMatriz(List linhas)