mirror of
https://github.com/appgurueu/modlib.git
synced 2024-11-21 23:03:44 +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