10 lines
211 B
Lua
10 lines
211 B
Lua
|
|
-- Returns True if 'table' contains the value 'val'. False otherwise.
|
|
function contains(table, val)
|
|
for i=1, #table do
|
|
if table[i] == val then
|
|
return true
|
|
end
|
|
end
|
|
return false
|
|
end
|