Unify withIndex docs wording
This commit is contained in:
@@ -9304,63 +9304,72 @@ public inline fun <R, C : MutableCollection<in R>> CharArray.mapTo(destination:
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a lazy [Iterable] of [IndexedValue] for each element of the original array.
|
||||
* Returns a lazy [Iterable] that wraps each element of the original array
|
||||
* into an [IndexedValue] containing the index of that element and the element itself.
|
||||
*/
|
||||
public fun <T> Array<out T>.withIndex(): Iterable<IndexedValue<T>> {
|
||||
return IndexingIterable { iterator() }
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a lazy [Iterable] of [IndexedValue] for each element of the original array.
|
||||
* Returns a lazy [Iterable] that wraps each element of the original array
|
||||
* into an [IndexedValue] containing the index of that element and the element itself.
|
||||
*/
|
||||
public fun ByteArray.withIndex(): Iterable<IndexedValue<Byte>> {
|
||||
return IndexingIterable { iterator() }
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a lazy [Iterable] of [IndexedValue] for each element of the original array.
|
||||
* Returns a lazy [Iterable] that wraps each element of the original array
|
||||
* into an [IndexedValue] containing the index of that element and the element itself.
|
||||
*/
|
||||
public fun ShortArray.withIndex(): Iterable<IndexedValue<Short>> {
|
||||
return IndexingIterable { iterator() }
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a lazy [Iterable] of [IndexedValue] for each element of the original array.
|
||||
* Returns a lazy [Iterable] that wraps each element of the original array
|
||||
* into an [IndexedValue] containing the index of that element and the element itself.
|
||||
*/
|
||||
public fun IntArray.withIndex(): Iterable<IndexedValue<Int>> {
|
||||
return IndexingIterable { iterator() }
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a lazy [Iterable] of [IndexedValue] for each element of the original array.
|
||||
* Returns a lazy [Iterable] that wraps each element of the original array
|
||||
* into an [IndexedValue] containing the index of that element and the element itself.
|
||||
*/
|
||||
public fun LongArray.withIndex(): Iterable<IndexedValue<Long>> {
|
||||
return IndexingIterable { iterator() }
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a lazy [Iterable] of [IndexedValue] for each element of the original array.
|
||||
* Returns a lazy [Iterable] that wraps each element of the original array
|
||||
* into an [IndexedValue] containing the index of that element and the element itself.
|
||||
*/
|
||||
public fun FloatArray.withIndex(): Iterable<IndexedValue<Float>> {
|
||||
return IndexingIterable { iterator() }
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a lazy [Iterable] of [IndexedValue] for each element of the original array.
|
||||
* Returns a lazy [Iterable] that wraps each element of the original array
|
||||
* into an [IndexedValue] containing the index of that element and the element itself.
|
||||
*/
|
||||
public fun DoubleArray.withIndex(): Iterable<IndexedValue<Double>> {
|
||||
return IndexingIterable { iterator() }
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a lazy [Iterable] of [IndexedValue] for each element of the original array.
|
||||
* Returns a lazy [Iterable] that wraps each element of the original array
|
||||
* into an [IndexedValue] containing the index of that element and the element itself.
|
||||
*/
|
||||
public fun BooleanArray.withIndex(): Iterable<IndexedValue<Boolean>> {
|
||||
return IndexingIterable { iterator() }
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a lazy [Iterable] of [IndexedValue] for each element of the original array.
|
||||
* Returns a lazy [Iterable] that wraps each element of the original array
|
||||
* into an [IndexedValue] containing the index of that element and the element itself.
|
||||
*/
|
||||
public fun CharArray.withIndex(): Iterable<IndexedValue<Char>> {
|
||||
return IndexingIterable { iterator() }
|
||||
|
||||
Reference in New Issue
Block a user