p-ranav / tabulate

Table Maker for Modern C++
MIT License
1.91k stars 134 forks source link

Add an option to control the cell trimming. #109

Closed yasezbk closed 10 months ago

yasezbk commented 10 months ago

This is useful when cells contain text where indentation is important (like JSON or XML).

This change preserves the existing behaviour (both left and right trimming is done by default).

Example output from no_trim sample:

+----------------+
| This is        |
| a cell that    |
| spans          |
| multiple lines |
+----------------+
| {              |
|   foo          |
|   bar          |
| }              |
+----------------+