splitByComma static method

String splitByComma(
  1. List<String> values, {
  2. String separator = ", ",
})

Implementation

static String splitByComma(List<String> values, {String separator = ", "}){
  String value = "";
  loop(values, (data, position, isFirst, isLast){
    if(!isNullOrEmpty(data)) {
      value = value + (isNullOrEmpty(value) ? data : (separator + data.toString())).toString();
    }
  });
  return value;
}