mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-05 06:53:52 +01:00
Update table_tostring.lua
This commit is contained in:
parent
484b7532eb
commit
f709d12b75
@ -9,10 +9,7 @@ local function table_tostring(tbl, sep, new_line)
|
|||||||
local ret = {}
|
local ret = {}
|
||||||
if type(tbl) ~= "table" then return "Error: input not table!" end
|
if type(tbl) ~= "table" then return "Error: input not table!" end
|
||||||
for key,value in pairs(tbl) do
|
for key,value in pairs(tbl) do
|
||||||
table.insert(ret,key)
|
table.insert(ret,tostring(key) .. sep .. tostring(value) .. new_line)
|
||||||
table.insert(ret,sep)
|
|
||||||
table.insert(ret,value)
|
|
||||||
table.insert(ret,new_line)
|
|
||||||
end
|
end
|
||||||
return table.concat(ret,"")
|
return table.concat(ret,"")
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user