take
Takes the specified number of items from this iterator. This method will return fewer items if no more are available.
Example:
val items = iterator.take(10)
if (items.length < 10) {
// End of iterator reached.
}
Content copied to clipboard
Takes the specified number of items from this iterator. This method will return fewer items if no more are available.
Example:
val items = iterator.take(10)
if (items.length < 10) {
// End of iterator reached.
}