CSet:RemoveAt
The RemoveAt method removes a member from the CSet by its index position in the set.
member = CSet:RemoveAt( index ) where |
index specifies the index of the member to remove.
member is the set member that was removed. On failure, nil is returned.
This method removes the member at an index. In comparison, the Remove method removes the set member by matching its value to set members. Removing a set member decreases the Count by 1 but does not delete the member.
Suppose a CSet exists with name S and that it contains 10 values. The following script removes from the list the member at index 5:
|
-- result: count=10 |
|
-- remove the member at index 5 |
|
-- result: count=9 |