tabular 0.1.0
Text-based table generator.
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
Tabular
A simple text-based table generator.
import tabular;
import std.stdio;
void main() {
string[][] data = [
["name", "age", "profession"],
["Andrew", "15", "blacksmith"],
["John", "25", "carpenter"]
];
// Use the TableBuilder
string myTable = new TableBuilder().withData(data).build();
writeln(myTable);
// Or use a simplified function call
writeln(renderTable(myTable));
/* Output:
+--------+-----+------------+
| name | age | profession |
+--------+-----+------------+
| Andrew | 15 | blacksmith |
+--------+-----+------------+
| John | 25 | carpenter |
+--------+-----+------------+
*/
}
Features
- Dynamic table sizes based on content.
- Text-alignment.
- Optional borders (on by default).
- Registered by Andrew Lalis
- 0.1.0 released 6 months ago
- andrewlalis/tabular
- MIT
- Copyright © 2022, Andrew Lalis
- Authors:
- Dependencies:
- none
- Versions:
-
0.1.0 2022-Aug-15 ~main 2022-Oct-10 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
6 downloads total
-
- Score:
- 0.4
- Short URL:
- tabular.dub.pm