https://github.com/spacejam/tablemaker
erlang tabular table printing
https://github.com/spacejam/tablemaker
Last synced: 29 days ago
JSON representation
erlang tabular table printing
- Host: GitHub
- URL: https://github.com/spacejam/tablemaker
- Owner: spacejam
- Created: 2016-01-04T14:12:28.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-01-04T17:28:41.000Z (over 10 years ago)
- Last Synced: 2024-10-29T17:51:18.890Z (over 1 year ago)
- Language: Erlang
- Size: 335 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Tablemaker
Simple column formatter for erlang.
Feed it a list of lists of strings.
`tablemaker:fmt` returns a string with column separators
`tablemaker:fmt_with_separators` returns a string with column and row separators
```
1> io:format(tablemaker:fmt([["C1R1", "C2R1"], ["C1R2", "C2R2"]])).
C1R1 | C2R1
C1R2 | C2R2
2> io:format(tablemaker:fmt([["C1R1randomstuff", "C2R1"], ["C1R2", "C2R2random"]])).
C1R1randomstuff | C2R1
C1R2 | C2R2random
3> io:format(tablemaker:fmt_with_separators([["C1R1randomstuff", "C2R1"], ["C1R2", "C2R2random"]])).
C1R1randomstuff | C2R1
------------------------------
C1R2 | C2R2random
```