JakeWharton/flip-tables

Support variable length data

Opened this issue · 0 comments

Is it possible to (implicitly) support variable length content? For example,

String[] headers = { "Test", "Header" };
String[][] data = {
    { "Foo", "Bar" },
    { "Kit", "Kat", "Kot" },
};
System.out.println(FlipTable.of(headers, data));

could yield something like:

╔══════╤════════╤═════╗
║ Test │ Header │     ║
╠══════╪════════╪═════╣
║ Foo  │ Bar    │     ║
╟──────┼────────┼─────╢
║ Kit  │ Kat    │ Kot ║
╚══════╧════════╧═════╝

I know this can be achieved by adding an empty string to each other row, but I'm asking for adding it implicitly. Also I'll be happy to submit a PR if it sounds good for you.