Lua base functions Lua bc (big number) functions Lua bit manipulation functions Lua coroutine functions Lua debug functions Lua io functions Lua LPEG library Lua math functions Lua os functions Lua package functions Lua PCRE regular expression functions Lua script extensions Lua string functions Lua syntax Lua table functions Lua utilities Scripting Scripting callbacks - pluginsĮnter a search string to find matching documentation. ncat - Concatenates table items together into a string table.foreach - Applies a function to each item in a table table.foreachi - Applies a function to each item in a numerically-keyed table table.getn - Returns the size of a numerically-keyed table table.maxn - Returns the highest numeric key in the table table.remove - Removes an item from a numerically-keyed table tn - Sets the size of a table (obsolete) table.sort - Sorts a table strings) you simply assign to the table item to insert it. The Lua authors recommend using the idiom "#t + 1" to insert to the end of a table nowadays. Table.insert (t, "jumped") - add to end of table Table.insert (t, 2, "very") - new element 2 If called with 2 arguments, the value is inserted at n+1, that is, the end of the table. Thus the new element becomes the one with index 'pos'. Inserts the value at (optional) position 'pos', renumbering existing elements if necessary to make room. Inserts a new item into a numerically-keyed table
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
January 2023
Categories |