Android Utililty Methods String Array Join

List of utility methods to do String Array Join

Description

The list of methods to do String Array Join are organized into topic(s).

Method

Stringjoin(String[] array, String separator, boolean ignoreNull)
join
return join(Arrays.asList(array), separator, ignoreNull);
Stringjoin(String[] list, String sep)
Split the string into an array of strings using one of the separator in 'sep'.
StringBuffer buffer = new StringBuffer(list[0]);
int len = list.length;
for (int i = 1; i < len; i++) {
    buffer.append(sep).append(list[i]);
return buffer.toString();
StringtoString(String[] arr, String delimiter)
to String
if (arr == null || arr.length == 0) {
    return "";
if (delimiter == null) {
    delimiter = ",";
StringBuffer result = new StringBuffer();
result.append(arr[0]);
...
Stringjoin(String[] strArray, char separator)
join
StringBuilder sb = new StringBuilder();
if (strArray != null) {
    boolean isFirst = true;
    for (int i = 0; i < strArray.length; i++) {
        if (isFirst) {
            isFirst = false;
        } else {
            sb.append(separator);
...