![]() See for more info table.size table.size (t) Returns the size of a key-value table (this function has to iterate through all of the table to count all elements). ![]() The sort algorithm is not stable that is, elements considered equal by the given order may have their relative positions changed by the sort. If comp is not given, then the standard Lua operator < is used instead. If comp is given, then it must be a function that receives two table elements, and returns true when the first is less than the second (so that not comp(a,a) will be true after the sort). "/a", mytable ) table.sort table.sort(Table ) Sorts table elements in a given order, in-place, from Table to Table, where n is the length of the table. Saves the table mytable to the lua file mytable in your Mudlet Home Directory table. table.keys table.keys(table) return a table that is the collection of the keys in use by the table passed in Parameters index_of ( words, "greetings" )) end table.is_empty table.is_empty(table) Check if a table is devoid of any values. contains ( words, "greetings" ) then table.remove ( words, table. The function to use for determining what order to iterate the items in the table. Spairs spairs(tbl, sortFunction) Returns an iterator similar to pairs(tbl) but sorts the keys before iterating through them. Through them you can add to tables, remove values, check if a value is present in the table, check the size of a table, and more. These functions are used to manipulate tables.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |