Instance Property (Default implementation)swift 6.0.1Swift

    count

    The number of elements in the collection.

    var count: Int { get }

    To check whether a collection is empty, use its isEmpty property instead of comparing count to zero. Unless the collection guarantees random-access performance, calculating count can be an O(n) operation.

    Implements

    Other members in extension

    Typealiases

    Show obsolete interfaces (1)

    Hide obsolete interfaces

    Instance members

    Show obsolete interfaces (6)

    Hide obsolete interfaces