grid-printer 0.1.1

An API to conveniently print formatted two dimensional arrays.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use grid_printer::GridPrinter;

fn main() {
    let cars = vec![
        vec!["Make", "Model", "Color", "Year", "Price", ],
        vec!["Ford", "Pinto", "Green", "1978", "$750.00", ],
        vec!["Toyota", "Tacoma", "Red", "2006", "$15,475.23", ],
        vec!["Lamborghini", "Diablo", "Yellow", "2001", "$238,459.99", ],
    ];

    let rows = cars.len();
    let cols = cars[0].len();
    let printer = GridPrinter::builder(rows, cols)
        .col_spacing(4)
        .build();
    printer.print(&cars);
}