Function formatTable

  • Format a table into a string of equally sized columns.

    Time complexity: O(n) where n is the number of rows * columns.

    Space complexity: O(n)

    Parameters

    • table: Table<string>

      Table to format

    • delimiter: string = ' '

      Delimiter to use in columns

    Returns string

    A formatted string representation of the table

    Format