Given a 2D array, this will generate a table with the data that can be used in markdown.
Example 2D Array:
String[][] table = {{"Fruits", "Sodas", "Cars"},
{"apples", "Fanta", "Ferrari"},
{"oranges", "Coke", "Lamborghini"},
{"mangoes", "Mountain Dew", "Porsche"}};
Output:
|Fruits |Sodas |Cars |
|-------|------------|-----------|
|apples |Fanta |Ferrari |
|oranges|Coke |Lamborghini|
|mangoes|Mountain Dew|Porsche |
Markdown:
Fruits | Sodas | Cars |
---|---|---|
apples | Fanta | Ferrari |
oranges | Coke | Lamborghini |
mangoes | Mountain Dew | Porsche |
(View this readme raw to see markdown rendering)