java/srcPubnubApi/com/pubnub/api/PubnubUtilCore.java
/**
     * Takes String[] of tokens, and String delimiter as input and returns
     * joined String
     *
     * @param sourceArray
     *            , input tokens in String array
     * @param delimiter
     *            , delimiter to join on
     * @return String , string of tokens joined by delimiter
     */
Takes String[] of tokens, and String delimiter as input and returns
joined String

@param sourceArray
, input tokens in String array
@param delimiter
, delimiter to join on
@return String , string of tokens joined by delimiter
Takes String [] of tokens and String delimiter as input and returns joined String @param sourceArray input tokens in String array @param delimiter delimiter to join on @return String string of tokens joined by delimiter
public static String joinString(String[] sourceArray, String delimiter) {
        if (sourceArray == null || delimiter == null) {
            return "";
        }
        StringBuffer sb = new StringBuffer();
        for (int i = 0; i < sourceArray.length - 1; i++) {
            sb.append(sourceArray[i]).append(delimiter);
        }
        sb.append(sourceArray[sourceArray.length - 1]);
        return sb.toString();
    }
public static String joinString ( String [ ] sourceArray , String delimiter ) { if ( sourceArray == null || delimiter == null ) { return "" ; } StringBuffer sb = new StringBuffer ( ) ; for ( int i = 0 ; i < sourceArray . length - 1 ; i ++ ) { sb . append ( sourceArray [ i ] ) . append ( delimiter ) ; } sb . append ( sourceArray [ sourceArray . length - 1 ] ) ; return sb . toString ( ) ; }
Takes String[] of tokens, and String delimiter as input and returns
 joined String
Takes String [] of tokens and String delimiter as input and returns joined String