collectionSizeOrDefault

fun <T> Iterable<T>.collectionSizeOrDefault(default: Int): Int

Returns the size of this iterable if it is known, or the specified default value otherwise.

Sources

(source)
Link copied to clipboard