diff options
Diffstat (limited to 'indra/newview/scripts/lua/util.lua')
-rw-r--r-- | indra/newview/scripts/lua/util.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/indra/newview/scripts/lua/util.lua b/indra/newview/scripts/lua/util.lua index e3af633ea7..5d6042dfe5 100644 --- a/indra/newview/scripts/lua/util.lua +++ b/indra/newview/scripts/lua/util.lua @@ -36,4 +36,14 @@ function util.equal(t1, t2) return util.empty(temp) end +-- check if array-like table contains certain value +function util.contains(t, v) + for _, value in ipairs(t) do + if value == v then + return true + end + end + return false +end + return util |