Java String Implode implode(String[] args)

Here you can find the source of implode(String[] args)

Description

implode

License

Open Source License

Declaration

public static String implode(String[] args) 

Method Source Code

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

public class Main {
    public static String implode(String[] args) {
        return implode(args, " ", 0);
    }/*  w  ww  .ja v  a2 s. c om*/

    public static String implode(String[] args, int start) {
        return implode(args, " ", start);
    }

    public static String implode(String[] args, String delimiter) {
        return implode(args, delimiter, 0);
    }

    public static String implode(String[] args, String delimiter, int start) {
        StringBuilder sb = new StringBuilder();
        for (int i = start; i < args.length; i++) {
            if (i != start) {
                sb.append(delimiter);
            }
            sb.append(args[i]);
        }
        return sb.toString();
    }
}

Related

  1. implode(String glue, String[] strArray)
  2. implode(String glue, T[] array)
  3. implode(String separator, String... data)
  4. implode(String separator, String... data)
  5. implode(String... strings)
  6. implode(String[] arr_str, String pemisah)
  7. implode(String[] array, char delimiter)
  8. implode(String[] array, String glue)
  9. implode(String[] array, String separator)