Sets the value of key, replacing the first entry with an equal key, or adding one if there is none. Returns a pointer to the stored value.
With duplicate keys present only the first match found is replaced. Pointers are stable unless the call had to add an entry and the table grew.
table_set :: (
table: *Table,
key: table.Key_Type,
value: table.Value_Type
) -> *table.Value_Type
Sets the value of key, replacing the first entry with an equal key, or adding one if there is none. Returns a pointer to the stored value.
With duplicate keys present only the first match found is replaced. Pointers are stable unless the call had to add an entry and the table grew.
Parameters
- table: *Table
- key: table.Key_Type
- value: table.Value_Type
Returns
- *table.Value_Type