CSet:RemoveFirst CSet:Remove

CSet:RemoveLast


The RemoveLast method removes the member at the tail of the list.

Syntax

member = CSet:RemoveLast()

    member is a reference to the member that was removed.

    On success, this method returns the removed member.

    On failure, nil is returned.

Remarks

Removing the list member decreases the list length by 1 member.

Example

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

 

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

-- result: count=10

S:RemoveLast()

-- remove the last member

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

-- result: count=9

Related Topics

CSet , RemoveAt, RemoveFirst