Files
simple-rust-tests/__term/confy_table/src/main.rs
2020-11-01 14:05:31 +08:00

21 lines
458 B
Rust

use comfy_table::Table;
fn main() {
let mut table = Table::new();
table
.set_header(vec!["Header1", "Header2", "Header3"])
.add_row(vec![
"This is a text",
"This is another text",
"This is the third text",
])
.add_row(vec![
"This is another text",
"Now\nadd some\nmulti line stuff",
"This is awesome",
]);
println!("{}", table);
}