以下示例是关于Lua中包含roblox如何在表格中找到东西用法的示例代码,想了解roblox如何在表格中找到东西的具体用法?roblox如何在表格中找到东西怎么用?roblox如何在表格中找到东西使用的例子?那么可以参考以下相关源代码片段来学习它的具体使用方法。
local t = {"a", "b", "c", "d", "e"}
print(table.find(t, "d")) -- 4
print(table.find(t, "z")) -- nil, because z is not in the table
print(table.find(t, "b", 3)) -- nil, because b appears before index 3
本文地址:https://www.itbaoku.cn/snippets/785576.html