I'm still tweaking it but I was thinking something along these lines...printTable Function Initialize two variables: one to hold the character count of the column label and the other to hold the character count of each itemif the character count of item is greater than the character count in the column label set them equal to each otherfor the column labels, set paddingNeeded equal to the width of each column minus the character count in columnLabelfor the rows, set paddingNeeded equal to width of each column minus the character count of each item or might use a function to compute widths then implement in printTable functionWhat do you think?
Topic:
Programming Languages
SubTopic:
Swift
Tags: