summaryrefslogtreecommitdiff
path: root/lua/util.lua
diff options
context:
space:
mode:
authorGuillermo Ramos2014-07-01 20:51:07 +0200
committerGuillermo Ramos2014-07-01 20:51:07 +0200
commitf3c354d396a38033dac28ece6f6220e75cef5aec (patch)
tree98c0977e8152472463cd2947589f725c9d5e2551 /lua/util.lua
parentaef238a0600c5cb775bb371dbb2463fd0381bff9 (diff)
download7l-f3c354d396a38033dac28ece6f6220e75cef5aec.tar.gz
[Lua] Día 2 (sin terminar)
Diffstat (limited to 'lua/util.lua')
-rw-r--r--lua/util.lua16
1 files changed, 16 insertions, 0 deletions
diff --git a/lua/util.lua b/lua/util.lua
new file mode 100644
index 0000000..e68c615
--- /dev/null
+++ b/lua/util.lua
@@ -0,0 +1,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
+