Java String Array Combine combine(String[] strs, String delimeter)

Here you can find the source of combine(String[] strs, String delimeter)

Description

combine

License

Open Source License

Declaration

public static String combine(String[] strs, String delimeter) 

Method Source Code

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

public class Main {
    public static String combine(String[] strs, String delimeter) {
        StringBuilder sb = new StringBuilder(strs.length * (20 + delimeter.length()));
        for (String str : strs) {
            sb.append(str);//  ww w . j  a  va  2 s  .  c o  m
            sb.append(delimeter);
        }
        return sb.toString();
    }
}

Related

  1. combine(String style1, String style2)
  2. combine(String... s)
  3. combine(String... vals)
  4. combine(String[] a, String[] b, String glue)
  5. combine(String[] array1, String[] array2)
  6. combine(String[] values, String delimiter)
  7. combine(String[] values, String regex)
  8. combine(String[] values, String separator)
  9. combine(String[] words)