mirror of
https://bitbucket.org/Mattrixwv/luaclasses.git
synced 2025-12-06 18:33:59 -05:00
Added function to create a string from a table
This commit is contained in:
@@ -406,3 +406,16 @@ function toBin(num)
|
||||
end
|
||||
return binNum;
|
||||
end
|
||||
|
||||
--Print a table
|
||||
function printTable(ary)
|
||||
local tableString = "[";
|
||||
for cnt = 1, #ary do
|
||||
tableString = tableString .. tostring(ary[cnt]);
|
||||
if(cnt < #ary) then
|
||||
tableString = tableString .. ", ";
|
||||
end
|
||||
end
|
||||
tableString = tableString .. "]";
|
||||
return tableString;
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user