You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to add a method that returns an iterator of table lines.
For my specific use case, I would use this to output multiple similar tables side by side.
Here is an example of my use case: I would append the line of each table and handle the edge case's if one table has less lines than the next (haven't quite figured that out)
I really like the idea of adding an iterator over all lines of a table.
To be honest, If we add this, I would prefer to not add fmt_with_margin as it's quite easy to write that helper yourself.
I'm a huge fan of sleek APIs and I try to strictly follow a simple rule (in the context of comfy_table):
"Everything up to the rendering of the table belongs into the project, everything outside of that doesn't."
This might be a little nitpicky, but the formatting around the table is something the user should take care of.
However, we should definitely give the user every possibility to easily work with the table output, so they can achieve whatever they're planning to do.
So yes, I'm a fan of the lines() function, but I'm against the margin format. I think this isn't in the scope of this library and can easily be achieved by the user after the addition of lines() :)
Table::lines() -> impl Iterator<item=String>
I would like to add a method that returns an iterator of table lines.
For my specific use case, I would use this to output multiple similar tables side by side.
Here is an example of my use case: I would append the line of each table and handle the edge case's if one table has less lines than the next (haven't quite figured that out)
Thoughts on adding this to the Table API @Nukesor @spenserblack
see PR #36
The text was updated successfully, but these errors were encountered: