Custom style is defined with strings, but expects fields to be 1 character long
I wanted to create a style without any lines, to simply pad the data to a tabular form. When I set all the elements of a Style to be empty strings, it still occupies space. And when trying to add two characters for one of the styles it did weird things with the table.
Hi @PMunch. the problem is the padding in defined in the column
let testStyleEmpty = Style(rowSeparator:"", colSeparator:"", cellEdgeLeft:"", cellEdgeRight:"", topLeft:"", topRight:"", bottomLeft:"", bottomRight:"", topRowSeparator:"", bottomRowSeparator:"", dashLineLeft:"", dashLineRight:"", dashLineColSeparatorLastRow:"", dashLineColSeparatorTopRow:"", dashLineColSeparator:"")
t2.style = testStyleEmpty
printTable(t2)
t2.setHeaders(@[newCell("ID", pad=0), newCell("Name", pad=0), newCell("Fav animal", pad=0), newCell("Date", 0)])
printTable(t2)
Here's an example of the output

And when trying to add two characters for one of the styles it did weird things with the table.
I'm not sure that I understand this one. Would you be so kind to add an example?
Aha, I see. For the two characters thing I just took the style example and put two characters in for colSeparator like this: http://ix.io/1KO5
I see the problem now, It used to be char when it was ascii type only. I clearly need to think about the representation maybe Rune would be a better choice.
Hmm, that's a good point. Didn't think of the UTF-8 issues with that. Well Rune is certainly an option, but they're a bit clumsy to work with aren't they? If you do go with Rune please add a convenience proc to create a style.