get
Returns the sub-array from the given range.
Example:
arrayOf(1..10)[0..4] // [1, 2, 3, 4, 5]
Since
1.1.0
See also
Throws
if the range is out of bounds of the array.
Returns the sub-array from the given range.
Example:
byteArrayOf(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)[0..4] // [1, 2, 3, 4, 5]
Since
1.1.0
See also
Throws
if the range is out of bounds of the array.
Returns the sub-array from the given range.
Example:
charArrayOf('a'..'z')[0..4] // ['a', 'b', 'c', 'd', 'e']
Since
1.1.0
See also
Throws
if the range is out of bounds of the array.
Returns the sub-array from the given range.
Example:
shortArrayOf(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)[0..4] // [1, 2, 3, 4, 5]
Since
1.1.0
See also
Throws
if the range is out of bounds of the array.
Returns the sub-array from the given range.
Example:
intArrayOf(1..10)[0..4] // [1, 2, 3, 4, 5]
Since
1.1.0
See also
Throws
if the range is out of bounds of the array.
Returns the sub-array from the given range.
Example:
longArrayOf(1..10L)[0..4] // [1L, 2L, 3L, 4L, 5L]
Since
1.1.0
See also
Throws
if the range is out of bounds of the array.
Returns the sub-array from the given range.
Example:
floatArrayOf(1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f)[0..4]
// [1.0f, 2.0f, 3.0f, 4.0f, 5.0f]
Since
1.1.0
See also
Throws
if the range is out of bounds of the array.
Returns the sub-array from the given range.
Example:
doubleArrayOf(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0)[0..4]
// [1.0, 2.0, 3.0, 4.0, 5.0]
Since
1.1.0
See also
Throws
if the range is out of bounds of the array.
Returns the sub-array from the given range.
Example:
booleanArrayOf(true, false, true, false, true, false, true, false, true, false)[0..4]
// [true, false, true, false, true]
Since
1.1.0
See also
Throws
if the range is out of bounds of the array.
Returns the sub-array from the given progression.
Example:
arrayOf(1..10)[0..9 step 2] // [1, 3, 5, 7, 9]
Since
1.1.0
See also
Throws
if the range is out of bounds of the array.
Returns the sub-array from the given progression.
Example:
byteArrayOf(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)[0..9 step 2] // [1, 3, 5, 7, 9]
Since
1.1.0
See also
Throws
if the range is out of bounds of the array.
Returns the sub-array from the given progression.
Example:
charArrayOf('a'..'z')[0..9 step 2] // ['a', 'c', 'e', 'g', 'i']
Since
1.1.0
See also
Throws
if the range is out of bounds of the array.
Returns the sub-array from the given progression.
Example:
shortArrayOf(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)[0..9 step 2] // [1, 3, 5, 7, 9]
Since
1.1.0
See also
Throws
if the range is out of bounds of the array.
Returns the sub-array from the given progression.
Example:
intArrayOf(1..10)[0..9 step 2] // [1, 3, 5, 7, 9]
Since
1.1.0
See also
Throws
if the range is out of bounds of the array.
Returns the sub-array from the given progression.
Example:
longArrayOf(1..10L)[0..9 step 2] // [1L, 3L, 5L, 7L, 9L]
Since
1.1.0
See also
Throws
if the range is out of bounds of the array.
Returns the sub-array from the given progression.
Example:
floatArrayOf(1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f)[0..9 step 2]
// [1.0f, 3.0f, 5.0f, 7.0f, 9.0f]
Since
1.1.0
See also
Throws
if the range is out of bounds of the array.
Returns the sub-array from the given progression.
Example:
doubleArrayOf(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0)[0..9 step 2]
// [1.0, 3.0, 5.0, 7.0, 9.0]
Since
1.1.0
See also
Throws
if the range is out of bounds of the array.
Returns the sub-array from the given progression.
Example:
booleanArrayOf(true, false, true, false, true, false, true, false, true, false)[0..9 step 2]
// [true, true, true, true, true]
Since
1.1.0
See also
Throws
if the range is out of bounds of the array.
Returns the sub-list from the given range.
Example:
listOf(1..10)[0..4] // [1, 2, 3, 4, 5]
Since
1.1.0
See also
Throws
if the range is out of bounds of the array.
Returns the sub-list from the given progression.
Example:
listOf(1..10)[0..9 step 2] // [1, 3, 5, 7, 9]
Since
1.1.0
See also
Throws
if the range is out of bounds of the array.