summaryrefslogtreecommitdiffstats
path: root/lib/format.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lib/format.lua')
-rw-r--r--lib/format.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/format.lua b/lib/format.lua
index 4e483de..60205af 100644
--- a/lib/format.lua
+++ b/lib/format.lua
@@ -94,6 +94,19 @@ function cap_begin_word ( str )
return data
end
+--give a table of ipairs and turn it into a string
+
+function ipairs_to_string ( t )
+ for a,b in ipairs(t) do
+ if a == 1 then
+ d = b
+ else
+ d = d .. "\n" .. b
+ end
+ end
+ return d
+end
+
-- This code comes from http://lua-users.org/wiki/SplitJoin
-- -- example: format.table_to_string(", ", {"Anna", "Bob", "Charlie", "Dolores"})