ℹ️

Tables

ℹ️
This module was derived from an open source module on github written by Kent Krantz
Table is a module we have included to make working with Lua Table easier.
Install the module through the Plugin Manager and then you can use.
local table=require("tables")

table.tostring

function table.tostring( tbl, space, gaps, lf )
This will return a string representation of the Table without functions. Space is the number of spaces to indent the full table with. gaps is the number of spaces to indent each level and lf is the lf for end of line should you chose.
To get a basic single line of a table you can call as follows.
local str=table.tostring(mytable, "", "", "")
 
The defaults create a pretty version of the table similar to how you would have coded it.
local str=table.tostring(mytable, "", " ", "\n")