CSet:Insert
The Insert method adds a member to the Set prior to a specified index.
CSet:Insert( member, index ) |
The member is inserted before the member already existing at index. To insert prior to the beginning of the set, use index = 1. Insertion moves all the members down in the list to open up the new position at index. In comparison with insertion, the Append method adds a member at the end of the set and does not need to know the index.
Suppose a CSet exists with name S and that it contains 10 strings. The following script fragment inserts a new string "ABC" at index 5:
|
-- result: Count = 10 |
|
-- Insert the new string at position 5 |
|
-- result: Count = 11 |