This repository has been archived on 2022-12-23. You can view files and clone it, but cannot push or open issues or pull requests.
fuck-premake-old2/website/docs/table.insertflat.md
2021-03-12 22:10:24 +01:00

567 B

Inserts a value of array of values into a table. If the value is itself a table, its contents are enumerated and added instead.

table.insertflat(arr, values)

Parameters

arr is a table containing indexed elements. values is a value or array of values to insert.

Return Value

Returns arr with the new values added in place.

Availability

Premake 5.0 or later.

Examples

-- returns { "x", "y" }
table.insertflat({ "x" }, "y")

-- returns { "x", "y", "z" }
table.insertflat({ "x" }, { "y", { "z" } })