2 releases

0.1.1 May 17, 2023
0.1.0 May 17, 2023

#9 in #stupid

Download history 4/week @ 2024-01-08 38/week @ 2024-01-15 5/week @ 2024-01-22 16/week @ 2024-02-12 14/week @ 2024-02-19 56/week @ 2024-02-26 45/week @ 2024-03-04 33/week @ 2024-03-11 35/week @ 2024-03-18 41/week @ 2024-03-25 78/week @ 2024-04-01 50/week @ 2024-04-08 18/week @ 2024-04-15

190 downloads per month
Used in 8 crates (3 directly)

AGPL-3.0

3KB

format_table

Format tables with a stupid API. Documentation.

Example:

let mut table = vec!["product\tquantity\tprice".to_string()];
for (p, q, r) in [("tomato", 12, 15), ("potato", 10, 20), ("rice", 5, 12)] {
	table.push(format!("{}\t{}\t{}", p, q, r));
}
format_table::format_table(table);

lib.rs:

Format tables with a stupid API.

Example:

let mut table = vec!["product\tquantity\tprice".to_string()];
for (p, q, r) in [("tomato", 12, 15), ("potato", 10, 20), ("rice", 5, 12)] {
    table.push(format!("{}\t{}\t{}", p, q, r));
}
format_table::format_table(table);

A table to be formatted is a Vec<String>, containing one string per line. Table columns in each line are separated by a \t character.

No runtime deps