shortenItemsInList method

void shortenItemsInList(
  1. List<String> _l,
  2. int _w
)

Implementation

void shortenItemsInList(List<String> _l, int _w) {
  String s;
  for (var x = 0; x < _l.length; x++) {
    s = _l[x];
    if (_l[x].length > _w) {
      _l[x] = s.substring(0, _w);
    }
  }
}