count

inline fun <T> Array<out T>.count(): Int(source)
inline fun ByteArray.count(): Int(source)
inline fun ShortArray.count(): Int(source)
inline fun IntArray.count(): Int(source)
inline fun LongArray.count(): Int(source)
inline fun FloatArray.count(): Int(source)
inline fun DoubleArray.count(): Int(source)
inline fun BooleanArray.count(): Int(source)
inline fun CharArray.count(): Int(source)

Returns the number of elements in this array.

Since Kotlin

1.0

inline fun <T> Array<out T>.count(predicate: (T) -> Boolean): Int(source)
inline fun ByteArray.count(predicate: (Byte) -> Boolean): Int(source)
inline fun ShortArray.count(predicate: (Short) -> Boolean): Int(source)
inline fun IntArray.count(predicate: (Int) -> Boolean): Int(source)
inline fun LongArray.count(predicate: (Long) -> Boolean): Int(source)
inline fun FloatArray.count(predicate: (Float) -> Boolean): Int(source)
inline fun DoubleArray.count(predicate: (Double) -> Boolean): Int(source)
inline fun BooleanArray.count(predicate: (Boolean) -> Boolean): Int(source)
inline fun CharArray.count(predicate: (Char) -> Boolean): Int(source)
inline fun <T> Iterable<T>.count(predicate: (T) -> Boolean): Int(source)

Returns the number of elements matching the given predicate.

Since Kotlin

1.0

fun <T> Iterable<T>.count(): Int(source)
inline fun <T> Collection<T>.count(): Int(source)

Returns the number of elements in this collection.

Since Kotlin

1.0

inline fun <K, V> Map<out K, V>.count(): Int(source)

Returns the number of entries in this map.

Since Kotlin

1.0

inline fun <K, V> Map<out K, V>.count(predicate: (Map.Entry<K, V>) -> Boolean): Int(source)

Returns the number of entries matching the given predicate.

Since Kotlin

1.0