List of utility methods to do String to List
ArrayList | stringToList(String str) string To List str = str.substring(1, str.length() - 1); String[] sline = str.split(","); ArrayList<Double> list = new ArrayList<>(); for (String s : sline) { list.add(Double.parseDouble(s)); return list; |
List | stringToList(String str) string To List List<String> list = new ArrayList<>(); if (str != null) { String tmp = str.replace('&', ','); String[] pieces = tmp.split(","); for (String piece : pieces) { String target = piece.trim(); if (target.length() > 0) { list.add(target); ... |
List | stringToList(String str, char delimiter) creates a List from a String "List" ArrayList list = new ArrayList(); int len = str.length(); if (len == 0) return list; StringBuffer el = new StringBuffer(); for (int i = 0; i < len; i++) { char c = str.charAt(i); if (c == delimiter) { ... |
List | stringToList(String str, String delim) string To List return Arrays.asList(tokenize(str, delim));
|
List | stringToList(String string, String separator) Convert a string of elements separated by a separator into a list. String[] values = string.split(separator); List<String> result = new ArrayList<String>(); for (String value : values) { result.add(value); return result; |
List | stringToList(String text, String seperator) string To List return Arrays.asList(text.split(seperator));
|
List | stringToList(String toList) string To List String[] st = toList.split(";"); List<String> list = new ArrayList<>(Arrays.asList(st)); return list; |
ArrayList | stringToList(String toList, String delimiter) Convert string to list ArrayList<String> list = new ArrayList<String>(); if (toList != null && !toList.isEmpty()) { String[] names = toList.split(delimiter); for (int i = 0; i < names.length; i++) { list.add(names[i]); return list; ... |
List | stringToList(String value) string To List if (value == null || value.length() == 0) throw new Exception(); if (value.startsWith("[")) value = value.substring(1); if (value.endsWith("]")) value = value.substring(0, value.length() - 1); String[] elements = value.split(","); List<String> list = new ArrayList(); ... |
List | stringToListOfTags(String p) Converting a string with a list of tags separated with commas to a list of strings return Arrays.asList(p.split(",")); |