diff options
author | hcpl <hcpl.prog@gmail.com> | 2017-06-06 21:43:31 +0300 |
---|---|---|
committer | hcpl <hcpl.prog@gmail.com> | 2017-06-06 21:43:31 +0300 |
commit | 96c072bac8b39462b2092df650ecc3465f641763 (patch) | |
tree | 95d84a3126ba82008f495c44f8cc53e462769382 /examples | |
parent | 38aaa2d7dd1d8e641d5ddefcfc2283d95ed68306 (diff) |
Add padding example
Diffstat (limited to 'examples')
-rw-r--r-- | examples/formatting.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/examples/formatting.rs b/examples/formatting.rs index a3cbc51..964cff7 100644 --- a/examples/formatting.rs +++ b/examples/formatting.rs @@ -83,4 +83,18 @@ fn main() { .padding(1, 1) .build()); table.printstd(); + + // Customized format with unicode and different padding + // Example to print + // ┌───────────────┬──────────────┐ + // │ Title 1 │ Title 2 │ + // ├───────────────┼──────────────┤ + // │ Value 1 │ Value 2 │ + // ├───────────────┼──────────────┤ + // │ Value three │ Value four │ + // └───────────────┴──────────────┘ + // Change individual format settings + println!("With unicode and padding:"); + table.get_format().padding(2, 2); + table.printstd(); } |