Update table_tostring.lua

This commit is contained in:
VorTechnix 2021-06-30 22:11:34 -07:00
parent 484b7532eb
commit f709d12b75

View file

@ -9,10 +9,7 @@ local function table_tostring(tbl, sep, new_line)
local ret = {}
if type(tbl) ~= "table" then return "Error: input not table!" end
for key,value in pairs(tbl) do
table.insert(ret,key)
table.insert(ret,sep)
table.insert(ret,value)
table.insert(ret,new_line)
table.insert(ret,tostring(key) .. sep .. tostring(value) .. new_line)
end
return table.concat(ret,"")
end