fmsl/std/array.lua

15 lines
319 B
Lua
Raw Permalink Normal View History

2024-09-15 08:06:18 +00:00
-- Concatenate multiple arrays into a new table, in order
-- @param ...: Table
-- @return Table
function table.concat_new(...)
local result = {}
for _, array in ipairs({...}) do
if array then
for _, value in ipairs(array) do
table.insert(result, value)
end
end
end
return result
end