Java List Join joinString(List val, String delim)

Here you can find the source of joinString(List val, String delim)

Description

join String

License

Open Source License

Declaration

public static String joinString(List<String> val, String delim) 

Method Source Code

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

import java.util.List;

public class Main {
    public static String joinString(List<String> val, String delim) {
        StringBuilder builder = new StringBuilder();
        for (String l : val) {
            builder.append(l);/*from  ww w. jav  a2s .c  o m*/
            builder.append(",");
        }

        return builder.toString().substring(0,
                builder.toString().length() - 1);

    }
}

Related

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