//! This example shows how you can create tables out of arrays. use kitty_table::TableFormatter; pub fn main() { // Create a table using the default formatter for [&str; 3], the // type we are supplying into it. let table = TableFormatter::from_style(); // Put the data we want to print into a collection. let data = [ ["These", "arrays", "need"], ["to", "be", "the"], ["same", "size", ":)"] ]; // Call debug_print to write the output to console— use // "let _ = ..." to ignore the output. let _ = table.debug_print(data); } /* Expected result: ┏━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━┓ ┃ "These" │ "arrays" │ "need" ┃ ┠─────────┼──────────┼────────┨ ┃ "to" │ "be" │ "the" ┃ ┠─────────┼──────────┼────────┨ ┃ "same" │ "size" │ ":)" ┃ ┗━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━┛ */