text-tables 0.3.1

A terminal/text table prettifier with no dependencies
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
extern crate text_tables;

use std::io;
use std::str;

fn main() {
    // can be vec or slices
    let data = [["A", "2x2"], ["pretty", "table"]];
    // we can either render to an array...
    let mut out = Vec::new();
    text_tables::render(&mut out, data).unwrap();
    println!("{}", str::from_utf8(&out).unwrap());
    // ...or we can use `Write` streams directly
    text_tables::render(&mut io::stdout(), data).unwrap();
}