ArrayList<String> convertCommaSprtdStrToList(String commaSprtdStr) {
ArrayList<String> list = new ArrayList<String>();
if(commaSprtdStr == null || commaSprtdStr.isEmpty())
return list;
String[] strArr = commaSprtdStr.split(",");
if(commaSprtdStr != null && !commaSprtdStr.isEmpty()) {
for(String str : strArr) {
list.add(str.trim());
}
}
return list;
}
ArrayList<String> list = new ArrayList<String>();
if(commaSprtdStr == null || commaSprtdStr.isEmpty())
return list;
String[] strArr = commaSprtdStr.split(",");
if(commaSprtdStr != null && !commaSprtdStr.isEmpty()) {
for(String str : strArr) {
list.add(str.trim());
}
}
return list;
}
No comments:
Post a Comment