List of utility methods to do String Array to String
String | array2string(String[] s) Serialize a string array into a single string. StringBuffer buf = new StringBuffer(); if (s == null) { return ""; for (int i = 0; i < s.length; i++) { buf.append(STARTTAG); buf.append(s[i]); buf.append(ENDTAG); ... |
String | arrayAsString(String[] haystack) build a string based on an array of strings, uses the default delimiter ', ' return arrayAsString(haystack, ", "); |
String | arrayAsString(String[] stringArray) Converts an array to a String. String s = ""; for (int i = 0; i < stringArray.length; i++) { s += stringArray[i]; return s; |
String | ArrayCombine(String[] array, String delimiter) Array Combine String output = ""; for (String word : array) { output += (output.isEmpty() ? "" : delimiter) + word; return output; |
int[] | arrayStringToArrayInt(final String[] as) Convert an array of strings to an array of integers. if (as == null) return null; int[] result = new int[as.length]; int j = 0; for (int i = 0; i < as.length; i++) { String s = as[i]; if (s == null) continue; ... |
String | arrayStringtoString(final String[] arrayString) Create a String object with all element of an array of String separated by double quotes and commas. StringBuffer sb = new StringBuffer(); if (arrayString != null) { for (int i = 0; i < arrayString.length; i++) { if (i > 0) sb.append(","); sb.append('\"'); sb.append(arrayString[i]); sb.append('\"'); ... |
String | arrayStringToString(String[] args) array String To String StringBuilder argumentStringBuilder = new StringBuilder(); for (int i = 0; i < args.length; i++) { argumentStringBuilder.append(args[i]); return argumentStringBuilder.toString(); |