add table.keys(t)

This commit is contained in:
MihailRis 2026-06-05 23:22:44 +03:00
parent 902c885fe0
commit d2f272e403

View file

@ -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