Searches a table to remove a specific element without an index
overrides.inspect |
remove_index(tbl, index) | Removes an item from an array in O(1) time. |
merge_table(t1, t2) | Adds the contents of table t2 to table t1 |
array_insert(tbl[, start_index], values) | Much faster method for inserting items into an array |
table_insert(tbl[, start_index], tbl2) | Much faster method for inserting keys into a table |
get_key(t, e) | Checks if a table contains an element |
get_index(t, e) | Checks if the arrayed portion of a table contains an element |
contains(t, e) | Checks if a table contains an element |
array_contains(t, e) | Checks if the arrayed portion of a table contains an element |
extract_keys(tbl, ...) | Extracts certain keys from a table |
set(t, index, element) | Adds an element into a specific index position while shuffling the rest down |
get_random_dictionary_entry(t, key) | Chooses a random entry from a table because this uses math.random, it cannot be used outside of events |
get_random_weighted(weighted_table, item_index, weight_index) | Chooses a random entry from a weighted table because this uses math.random, it cannot be used outside of events |
clear_table(t, array) | Clears all existing entries in a table |
shuffle_table(t, rng) | Creates a fisher-yates shuffle of a sequential number-indexed table because this uses math.random, it cannot be used outside of events if no rng is supplied from: http://www.sdknews.com/cross-platform/corona/tutorial-how-to-shuffle-table-items |
get_values(tbl[, sorted][, as_string]) | Returns a copy of all of the values in the table. |
get_keys(tbl[, sorted][, as_string]) | Returns a copy of all of the keys in the table. |
alphanumsort(tbl) | Returns the list is a sorted way that would be expected by people (this is by key) |
keysort(tbl) | Returns the list is a sorted way that would be expected by people (this is by key) (faster alternative than above) |
inspect | Similar to serpent.block, returns a string with a pretty representation of a table. |
size | Takes a table and returns the number of entries in the table. |
deep_copy | Creates a deepcopy of a table. |
merge | Merges multiple tables. |
equals | Determines if two tables are structurally equal. |
Removes an item from an array in O(1) time.
The catch is that fast_remove doesn't guarantee to maintain the order of items in the array.
Parameters: