mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-22 17:18:39 +00:00
Add table.keyof()
(#14910)
This commit is contained in:
parent
a677d33bdf
commit
dc7a7a0ed9
4 changed files with 25 additions and 1 deletions
|
@ -4025,6 +4025,10 @@ Helper functions
|
|||
the value `val` in the table `list`. Non-numerical indices are ignored.
|
||||
If `val` could not be found, `-1` is returned. `list` must not have
|
||||
negative indices.
|
||||
* `table.keyof(table, val)`: returns the key containing
|
||||
the value `val` in the table `table`. If multiple keys contain `val`,
|
||||
it is unspecified which key will be returned.
|
||||
If `val` could not be found, `nil` is returned.
|
||||
* `table.insert_all(table, other_table)`:
|
||||
* Appends all values in `other_table` to `table` - uses `#table + 1` to
|
||||
find new indices.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue