Stybulate - Tabulate with Style!

A Rust library to create ASCII tables with styled borders. Inspired by the PyPi package https://pypi.org/project/tabulate/.

Build status Crates.io Rust Docs.rs License

Example

rust use stybulate::{tabulate, Style, Cell}; let headers = vec!["strings", "numbers"]; let contents = vec![ vec![Cell::Text("answer"), Cell::Int(42)], vec![Cell::Text("pi"), Cell::Float(3.1415)], ]; let expected = vec![ "╒═══════════╤═══════════╕", "│ strings │ numbers │", "╞═══════════╪═══════════╡", "│ answer │ 42 │", "├───────────┼───────────┤", "│ pi │ 3.1415 │", "╘═══════════╧═══════════╛", ].join("\n"); let table = tabulate(Style::Fancy, contents, headers); assert_eq!(expected, table);

License

This project is licensed under either of

at your option.