Android String Array Join joinStrings(String joiner, Iterable parts)

Here you can find the source of joinStrings(String joiner, Iterable parts)

Description

join Strings

Declaration

public static String joinStrings(String joiner, Iterable<String> parts) 

Method Source Code

//package com.java2s;

public class Main {
    public static String joinStrings(String joiner, Iterable<String> parts) {
        StringBuilder builder = new StringBuilder();
        boolean first = true;
        for (String part : parts) {
            if (!first) {
                builder.append(joiner);/*from  w  w  w .  ja  v  a2 s.  co m*/
            }
            builder.append(part);
            first = false;
        }
        return builder.toString();
    }
}

Related

  1. implode(String[] strings, String glue)
  2. concatenate(String[] elements, String delimiter)
  3. makeDivideString(String[] arr_str, String divide_str)
  4. join(String spliter, Object[] arr)
  5. join(String spliter, Object[] arr)
  6. join(String[] strings, String separator)
  7. join(String[] s, String glue)
  8. join(String delimiter, String[] strings)