seleznevae / libfort

C/C++ library to create formatted ASCII tables for console applications
MIT License
493 stars 65 forks source link

Implemented ft_col_count() along with corresponding unit tests #57

Closed brlcad closed 3 years ago

brlcad commented 3 years ago

This pairs with the existing ft_row_count() using the same column counting method used elsewhere in the code (i.e., iterate over rows and find the biggest).

Added unit tests for ft_row_count(), ft_col_count(), ft_is_empty(), and use a myriad of insertion methods to increase coverage.

Having ft_col_count() makes it easy to call ft_erase_range(t,0,0,ft_row_count(t), ft_col_count(t)) as a means for erasing the whole table and sets the stage for (i.e., didn't implement) an ft_table_erase(t) that wipes out all rows without going as far as ft_table_destroy().

seleznevae commented 3 years ago

Hi! Looks cool. Many thanks.