summaryrefslogtreecommitdiff
path: root/indra/newview/scripts/lua/util.lua
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2024-03-23 16:58:58 -0500
committerNat Goodspeed <nat@lindenlab.com>2024-03-23 16:58:58 -0500
commitfaff73494ee3247bcca9bb33b59629fd39adb3e7 (patch)
tree4efd822c4d15e30a7f2cb77633a55850d6bd3646 /indra/newview/scripts/lua/util.lua
parent93b30f960ea327fe3c36deed72a8075ce0d13f19 (diff)
parent7bf84bdcbf13084ff3b94590e4061b4a6708b4dc (diff)
Merge branch 'release/luau-scripting' of secondlife/viewer into lua-fiber
Diffstat (limited to 'indra/newview/scripts/lua/util.lua')
-rw-r--r--indra/newview/scripts/lua/util.lua10
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