mapToFineList method
Return list
Implementation
List<String> mapToFineList(Map<String, String> thisMap, int _kl, _vl) {
// parameters int _kl, _vl for value and key lengths in "table"
List<String> _l = [];
thisMap.forEach((k, v) {
// Truncate or padRight it
// Must guarantee to length and minimum
String _ks = '';
String _vs = '';
if (k.length < _kl) {
// ? + 1
_ks = k.padRight(_kl + 1);
} else {
// but it may be shorter
_ks = k.substring(0, _kl);
}
;
if (v.length < _vl) {
_vs = v.padRight(_vl + 1);
} else {
// but it may be shorter
_vs = v.substring(0, _vl);
}
;
String _s = '';
_s = '$_ks $_vs';
_l.add(_s);
} // -- thisMap
); // -- forEach k v
return _l;
}