Java List Join joinStringList(String delimiter, List stringList)

Here you can find the source of joinStringList(String delimiter, List stringList)

Description

join String List

License

Open Source License

Declaration

public static String joinStringList(String delimiter,
            List<String> stringList) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.List;

public class Main {
    public static String joinStringList(String delimiter,
            List<String> stringList) {
        String result = "";
        boolean isFirst = true;

        for (String s : stringList) {
            if (!isFirst) {
                result = result + delimiter;
            }/*from   www  .  j  a  v a2  s  . c o  m*/
            isFirst = false;

            result = result + s;
        }

        return result;
    }
}

Related

  1. joinSegments(List segments, int startIndex, int endIndex)
  2. joinString(java.util.List values, String delimiter)
  3. joinString(List array, String symbol)
  4. joinString(List objs, String separator)
  5. joinString(List val, String delim)
  6. joinStrings(Iterable list)
  7. joinStrings(List aList, String aString)
  8. joinStrings(List list, String delim)
  9. joinStrings(List strings, String separator)