List of utility methods to do String Implode
String | implode(T[] array, String delim) Based on implode() in PHP String result = ""; for (T val : array) { result += val.toString() + delim; if (!result.isEmpty()) { result = result.substring(0, result.length() - 1); return result; ... |
String | implodeParams(Object[] params) Converts and array of objects into a concatenated string Uses the "," character as the glue return implodeParams(params, ","); |
String | implodeString(String[] strings, String seperator) implode String if (strings.length == 0) { return ""; } else { StringBuilder sb = new StringBuilder(); sb.append(strings[0]); for (int i = 1; i < strings.length; i++) { sb.append(seperator); sb.append(strings[i]); ... |
String | implodeStringArray(String tokens[], String separator) implode String Array if (tokens.length == 0) { return ""; } else { StringBuffer sb = new StringBuffer(); sb.append(tokens[0]); for (int i = 1; i < tokens.length; i++) { sb.append(separator); sb.append(tokens[i]); ... |
String | implodeStrings(String[] strings) implode Strings StringBuilder buffer = new StringBuilder(); for (int i = 0; i < strings.length; i++) buffer.append(strings[i]).append(','); return buffer.toString(); |