[Turn off line numbering]1: arg list, lines, @rest; 2: var linelength, cols, width, i, j, line, outlist; 3: 4: [(linelength ?= (| sender().linelen() |) || 78)] = rest; 5: cols = list.length() / lines + (list.length() % lines ? 1 : 0); 6: width = linelength / cols; 7: outlist = []; 8: for i in [1 .. lines] { 9: line = ""; 10: for j in [0 .. cols] 11: (| (line = line + list[i + j * lines].pad(width)) |); 12: outlist += [line]; 13: } 14: return outlist;
// Created 27-Mar-1995 as a part of ColdCore, see: @help Credit