CSet:RemoveFirst


The RemoveFirst method removes the member at the head of the list.

Syntax

member = CSet:RemoveFirst()

where

    member is the member that was removed. On failure, nil is returned.

  

Removing a set member decreases the Count by 1 but does not delete the member.

Example

Suppose a CSet exists with name S and that it contains 10 values. The following script removes the value at the head of the list:

Printf("count=%d", S:Count())

-- result: count=10

S:RemoveFirst()

-- remove the first member

Printf("count=%d", S:Count())

-- result: count=9

Related Topics

RemoveAt

RemoveLast

CSet class