summaryrefslogtreecommitdiff
path: root/lua/util.lua
blob: e68c615cf407accd896be1d506fe41648b497c17 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
function print_table(t)
   for k, v in pairs(t) do
      print(k .. ": " .. v)
   end
end

function table_to_string(t)
   local result = {}

   for k, v in pairs(t) do
      result[#result+1] = k .. ": " .. v
   end

   return table.concat(result, "\n")
end