fancy-table 0.4.1

Fancy tables with bells and whistles
Documentation
use fancy_table::{
    Align, FancyTable, FancyTableOpts, Layout, Separator, TitleAlign, charset::Charset,
};

fn main() {
    let table = FancyTable::create(FancyTableOpts {
        charset: Charset::Simple,
        ..Default::default()
    })
    .add_title_with_align("props", TitleAlign::RightOffset(1))
    .add_column_named("ID", Layout::Slim)
    .add_column_named("NAME", Layout::Fixed(16))
    .add_column_named_wrapping_with_align("CHARACTER", Layout::Fixed(11), Align::Center)
    .add_column_named_with_align("BADNESS SCALE", Layout::Expandable(15), Align::Center)
    .add_column_named_wrapping_with_align("DESCRIPTION", Layout::Expandable(150), Align::Right)
    .hseparator(Some(Separator::Single))
    .padding(1)
    .build();

    table.render(vec![
        [
            "1",
            "Maeglin",
            "Elf",
            "Renegade\n10/10",
            "Maeglin is an elf who betrayed his fellow elves to the evil Morgoth in an age before The Lord of the Rings.",
        ],
        [
            "29",
            "Tauriel",
            "Woodland elf",
            "Tearjerker\n1/10",
            "Tauriel is a woodland elf created for The Hobbit films. Her name means \"daughter of the forest\" in Sindarin.",
        ]
    ]);
}