mirror of
https://github.com/appgurueu/modlib.git
synced 2024-11-22 07:13:45 +01:00
Add table.clear
This commit is contained in:
parent
94cbfe30eb
commit
8b538587ad
@ -400,6 +400,12 @@ function is_empty(table)
|
||||
return next(table) == nil
|
||||
end
|
||||
|
||||
function clear(table)
|
||||
for k in pairs(table) do
|
||||
table[k] = nil
|
||||
end
|
||||
end
|
||||
|
||||
function foreach(table, func)
|
||||
for k, v in pairs(table) do
|
||||
func(k, v)
|
||||
|
Loading…
Reference in New Issue
Block a user