Fixed table.tostring

This commit is contained in:
Cooldude2606
2018-05-29 22:03:32 +01:00
parent 3939b13759
commit 98481696f0

View File

@@ -438,7 +438,7 @@ end
-- table.tostring(a) -- return '{["k1"]="foo",["k2"]="bar"}' -- table.tostring(a) -- return '{["k1"]="foo",["k2"]="bar"}'
-- @tparam table tbl table to convert -- @tparam table tbl table to convert
-- @treturn string the converted table -- @treturn string the converted table
function table.to_string(tbl) function table.tostring(tbl)
local result, done = {}, {} local result, done = {}, {}
for k, v in ipairs(tbl) do for k, v in ipairs(tbl) do
table.insert(result,table.val_to_str(v)) table.insert(result,table.val_to_str(v))