3.04 Table functions
Copies the contents of one table to another, including metatables and subtables.
source A table
base Will use this as the primary source for copying and then grab any additional keys
from 'source' didn't exist here.
Returns a table.
For development/debugging purposes. Returns a table's contents as a string, indented to show nesting, etc.
t A table
max_depth How many levels of nesting to read through.
cur_depth Will "pad" the indenting by this amount of tabs.
Returns a string.
Recursively compares the contents of two tables, since Lua doesn't do this on its own.
t_a A table
t_b Another table
Returns a boolean.
Looks through a table and returns the key of the first matching value.
t A table
find Search term - a string, a number, a boolean
f Sorting function. Defaults to ```ipairs```.
If you need to find multiple values in the same table, and each is known to only occur once, it
will be much more efficient to copy the table with GUI.table_invert
and just check for keys
as normal.
Returns a string or number.
Returns a table with the keys and values swapped.
t A table
Returns a table.
For use in place of pairs or ipairs - iterates through a table in alphabetical/numerical order.
t A table
f An iterator function, as with 'pairs' or 'ipairs'. Specify f = "full" to perform
a comparison across types. i.e.
12 > "6 apples" -> true
Introduction
- 1. Getting started
- 2. Parts of a basic script
- 3. How it works
- 4. Fonts and colors
- 5. Element methods
Elements
- 1. Button
- 2. Frame
- 3. Knob
- 4. Label
- 5. Listbox
- 6. Menubar
- 7. Menubox
- 8. Options
- 9. Slider
- 10. Tabs
- 11. Textbox
- 12. TextEditor
- 13. Window
Core functions
- 1. Element creation
- 2. GUI variables
- 3. Script hooks
- 4. Table functions
- 5. Text functions
- 6. Color functions
- 7. Math and Logic functions
- 8. Graphics functions
- 9. Element functions
Additional documentation