Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Creator: Bolodefchoco
- --Made in: 24/10/2015
- --Last update: 26/02/2017
- --[[ Notes:
- Does:
- Verifica se um valor se encontra na tabela table (Não utiliza ipairs, poderá chegar dentro das tabelas).
- Args:
- list --> Tabela a ser inserida
- value --> Valor a ser procurado
- index --> Caso seja necessário identificar o valor dentro de uma multiarray, informe o índice.
- ]]--
- table.find = function(list,value,index)
- for k,v in next,list do
- if index then
- if v[index] == value then
- return true,k
- end
- else
- if v == value then
- return true,k
- end
- end
- end
- return false
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement