export function paddingList(list: Array) { const maxColumnSize: number = 32; const maxRowSize = 3; let colIndex = 1; let result = ''; for (var i = 0; i < list.length; i++) { let el = list[i]; const rowSize: number = parseInt((el.length / maxColumnSize).toString(), 10) + 1; el = el.padEnd(rowSize * maxColumnSize, ' '); colIndex = colIndex + rowSize; if (colIndex > maxRowSize) { el = `${el}\r\n`; colIndex = colIndex % maxRowSize; } result += el; } return result; }