All Manuals > CAPI User Guide and Reference Manual > 21 CAPI Reference Entries

count-collection-items Generic Function

Summary

Returns the number of items in a collection.

Package

capi

Signature

count-collection-items collection &optional items

Arguments
collection
items
A sequence.
Description

The generic function count-collection-items returns the number of items in collection by calling the items-count-function.

items defaults to nil. If it is non-nil, it is used instead of the items of collection.

Examples

The following example uses count-collection-items to return the number of items in a list panel.

(setq list (make-instance 'capi:list-panel
                          :items '(1 2 3 4 5)))
(capi:count-collection-items list)

The following example shows how to count the number of items in a specified list.

(capi:count-collection-items list '(1 2))
See also

collection
get-collection-item
search-for-item


CAPI User Guide and Reference Manual (Macintosh version) - 01 Dec 2021 19:31:27