Initial community commit
This commit is contained in:
26
Src/external_dependencies/openmpt-trunk/include/premake/website/docs/table.flatten.md
vendored
Normal file
26
Src/external_dependencies/openmpt-trunk/include/premake/website/docs/table.flatten.md
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
Flattens a hierarchy of arrays into a single array containing all of the values.
|
||||
|
||||
```lua
|
||||
table.flatten(arr)
|
||||
```
|
||||
|
||||
### Parameters ###
|
||||
|
||||
`arr` is an table containing indexed values, which may themselves also contain indexed values.
|
||||
|
||||
|
||||
### Return Value ###
|
||||
|
||||
A new array containing all of the elements, nested or otherwise.
|
||||
|
||||
|
||||
### Availability ###
|
||||
|
||||
Premake 5.0 or later.
|
||||
|
||||
### Examples ###
|
||||
|
||||
```lua
|
||||
-- returns { "A", "B", "C", "D" }
|
||||
flat = table.flatten { "A", { "B", "C", { "D" } } }
|
||||
```
|
||||
Reference in New Issue
Block a user