You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
363 B
17 lines
363 B
|
3 years ago
|
local Table = {}
|
||
|
|
|
||
|
|
local pairs = pairs
|
||
|
|
|
||
|
|
-- Extending Lua's table API would make more sense, but we don't want to modify the environment to avoid interoperability issues
|
||
|
|
function Table.Count(luaTable)
|
||
|
|
local numEntries = 0
|
||
|
|
|
||
|
|
for key, value in pairs(luaTable) do
|
||
|
|
numEntries = numEntries + 1
|
||
|
|
end
|
||
|
|
|
||
|
|
return numEntries
|
||
|
|
end
|
||
|
|
|
||
|
|
Rarity.Utils.Table = Table
|