Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR LUA

lua indexof

table.indexOf = function ( tab, value )
  for index, val in ipairs(tab) do
    if value == val then
      return index
    else
      return -1
    end
  end
end
 
PREVIOUS NEXT
Tagged: #lua #indexof
ADD COMMENT
Topic
Name
1+1 =