mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add table.keys(t)
This commit is contained in:
parent
902c885fe0
commit
d2f272e403
1 changed files with 8 additions and 0 deletions
|
|
@ -201,3 +201,11 @@ function table.tostring(t)
|
|||
end
|
||||
return s..']'
|
||||
end
|
||||
|
||||
function table.keys(t)
|
||||
local keys = {}
|
||||
for key, _ in pairs(t) do
|
||||
table.insert(keys, key)
|
||||
end
|
||||
return keys
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue