TRIM v11
The TRIM
method removes an element or elements from the end of a collection. The syntax for the TRIM
method is:
collection
is the name of a collection.
count
is the number of elements removed from the end of the collection. Advanced Server will return an error if count
is less than 0
or greater than the number of elements in the collection.
The following example demonstrates using the TRIM
method to remove an element from the end of a collection:
COUNT
indicates that before the TRIM
method, there were 5
elements in the collection; after the TRIM
method was invoked, the collection contains 4
elements.
You can also specify the number of elements to remove from the end of the collection with the TRIM
method:
COUNT
indicates that before the TRIM
method, there were 5
elements in the collection; after the TRIM
method was invoked, the collection contains 3
elements.