Bugfixes on CLI interactions
This commit is contained in:
@ -1,9 +1,19 @@
|
||||
--- @function modpol.copy_table
|
||||
-- Returns a copy of the table inputted
|
||||
function modpol.copy_table(t)
|
||||
function modpol.util.copy_table(t)
|
||||
local t2 = {}
|
||||
for k,v in pairs(t) do
|
||||
t2[k] = v
|
||||
end
|
||||
return t2
|
||||
end
|
||||
|
||||
--- @function modpol.copy_table
|
||||
-- Returns the number of elements in a pairs table
|
||||
function modpol.util.num_pairs(t)
|
||||
local i = 0
|
||||
for k,v in pairs(t) do
|
||||
i = i + 1
|
||||
end
|
||||
return i
|
||||
end
|
||||
|
Reference in New Issue
Block a user