aboutsummaryrefslogtreecommitdiff
path: root/src/format-table/README.md
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-05-17 13:01:37 +0200
committerAlex Auvolat <alex@adnab.me>2023-05-17 13:01:37 +0200
commita1cec2cd60d64208caa2cbd11d8e6f885e80f630 (patch)
treed4e73ac7a8b1e90a998cf2795e20f95a0be9b871 /src/format-table/README.md
parentb66f247580dcfb733718949c35240500903a0802 (diff)
downloadgarage-format_table-v0.1.0.tar.gz
garage-format_table-v0.1.0.zip
Split format_table into separate crate and reduce k2v-client dependenciesformat_table-v0.1.0
Diffstat (limited to 'src/format-table/README.md')
-rw-r--r--src/format-table/README.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/format-table/README.md b/src/format-table/README.md
new file mode 100644
index 00000000..d918bdf4
--- /dev/null
+++ b/src/format-table/README.md
@@ -0,0 +1,13 @@
+# `format_table`
+
+Format tables with a stupid API. [Documentation](https://docs.rs/format_table).
+
+Example:
+
+```rust
+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);
+```