diff --git a/runtime/src/main/kotlin/generated/_ArraysNative.kt b/runtime/src/main/kotlin/generated/_ArraysNative.kt index 543c133d972..56b1f5f7ac7 100644 --- a/runtime/src/main/kotlin/generated/_ArraysNative.kt +++ b/runtime/src/main/kotlin/generated/_ArraysNative.kt @@ -11,6 +11,96 @@ package kotlin.collections // +/** + * Returns an element at the given [index] or throws an [IndexOutOfBoundsException] if the [index] is out of bounds of this array. + * + * @sample samples.collections.Collections.Elements.elementAt + */ +@kotlin.internal.InlineOnly +public actual inline fun Array.elementAt(index: Int): T { + return get(index) +} + +/** + * Returns an element at the given [index] or throws an [IndexOutOfBoundsException] if the [index] is out of bounds of this array. + * + * @sample samples.collections.Collections.Elements.elementAt + */ +@kotlin.internal.InlineOnly +public actual inline fun ByteArray.elementAt(index: Int): Byte { + return get(index) +} + +/** + * Returns an element at the given [index] or throws an [IndexOutOfBoundsException] if the [index] is out of bounds of this array. + * + * @sample samples.collections.Collections.Elements.elementAt + */ +@kotlin.internal.InlineOnly +public actual inline fun ShortArray.elementAt(index: Int): Short { + return get(index) +} + +/** + * Returns an element at the given [index] or throws an [IndexOutOfBoundsException] if the [index] is out of bounds of this array. + * + * @sample samples.collections.Collections.Elements.elementAt + */ +@kotlin.internal.InlineOnly +public actual inline fun IntArray.elementAt(index: Int): Int { + return get(index) +} + +/** + * Returns an element at the given [index] or throws an [IndexOutOfBoundsException] if the [index] is out of bounds of this array. + * + * @sample samples.collections.Collections.Elements.elementAt + */ +@kotlin.internal.InlineOnly +public actual inline fun LongArray.elementAt(index: Int): Long { + return get(index) +} + +/** + * Returns an element at the given [index] or throws an [IndexOutOfBoundsException] if the [index] is out of bounds of this array. + * + * @sample samples.collections.Collections.Elements.elementAt + */ +@kotlin.internal.InlineOnly +public actual inline fun FloatArray.elementAt(index: Int): Float { + return get(index) +} + +/** + * Returns an element at the given [index] or throws an [IndexOutOfBoundsException] if the [index] is out of bounds of this array. + * + * @sample samples.collections.Collections.Elements.elementAt + */ +@kotlin.internal.InlineOnly +public actual inline fun DoubleArray.elementAt(index: Int): Double { + return get(index) +} + +/** + * Returns an element at the given [index] or throws an [IndexOutOfBoundsException] if the [index] is out of bounds of this array. + * + * @sample samples.collections.Collections.Elements.elementAt + */ +@kotlin.internal.InlineOnly +public actual inline fun BooleanArray.elementAt(index: Int): Boolean { + return get(index) +} + +/** + * Returns an element at the given [index] or throws an [IndexOutOfBoundsException] if the [index] is out of bounds of this array. + * + * @sample samples.collections.Collections.Elements.elementAt + */ +@kotlin.internal.InlineOnly +public actual inline fun CharArray.elementAt(index: Int): Char { + return get(index) +} + /** * Returns a [List] that wraps the original array. */ diff --git a/runtime/src/main/kotlin/generated/_StringsNative.kt b/runtime/src/main/kotlin/generated/_StringsNative.kt new file mode 100644 index 00000000000..9568099f4cb --- /dev/null +++ b/runtime/src/main/kotlin/generated/_StringsNative.kt @@ -0,0 +1,23 @@ +/* + * Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the license/LICENSE.txt file. + */ + +package kotlin.text + +// +// NOTE: THIS FILE IS AUTO-GENERATED by the GenerateStandardLib.kt +// See: https://github.com/JetBrains/kotlin/tree/master/libraries/stdlib +// + + +/** + * Returns a character at the given [index] or throws an [IndexOutOfBoundsException] if the [index] is out of bounds of this char sequence. + * + * @sample samples.collections.Collections.Elements.elementAt + */ +@kotlin.internal.InlineOnly +public actual inline fun CharSequence.elementAt(index: Int): Char { + return get(index) +} + diff --git a/runtime/src/main/kotlin/generated/_UArraysNative.kt b/runtime/src/main/kotlin/generated/_UArraysNative.kt index 8f8eaee7f7c..95acace10ce 100644 --- a/runtime/src/main/kotlin/generated/_UArraysNative.kt +++ b/runtime/src/main/kotlin/generated/_UArraysNative.kt @@ -5,6 +5,59 @@ package kotlin.collections +// +// NOTE: THIS FILE IS AUTO-GENERATED by the GenerateStandardLib.kt +// See: https://github.com/JetBrains/kotlin/tree/master/libraries/stdlib +// + + +/** + * Returns an element at the given [index] or throws an [IndexOutOfBoundsException] if the [index] is out of bounds of this array. + * + * @sample samples.collections.Collections.Elements.elementAt + */ +@SinceKotlin("1.3") +@ExperimentalUnsignedTypes +@kotlin.internal.InlineOnly +public actual inline fun UIntArray.elementAt(index: Int): UInt { + return get(index) +} + +/** + * Returns an element at the given [index] or throws an [IndexOutOfBoundsException] if the [index] is out of bounds of this array. + * + * @sample samples.collections.Collections.Elements.elementAt + */ +@SinceKotlin("1.3") +@ExperimentalUnsignedTypes +@kotlin.internal.InlineOnly +public actual inline fun ULongArray.elementAt(index: Int): ULong { + return get(index) +} + +/** + * Returns an element at the given [index] or throws an [IndexOutOfBoundsException] if the [index] is out of bounds of this array. + * + * @sample samples.collections.Collections.Elements.elementAt + */ +@SinceKotlin("1.3") +@ExperimentalUnsignedTypes +@kotlin.internal.InlineOnly +public actual inline fun UByteArray.elementAt(index: Int): UByte { + return get(index) +} + +/** + * Returns an element at the given [index] or throws an [IndexOutOfBoundsException] if the [index] is out of bounds of this array. + * + * @sample samples.collections.Collections.Elements.elementAt + */ +@SinceKotlin("1.3") +@ExperimentalUnsignedTypes +@kotlin.internal.InlineOnly +public actual inline fun UShortArray.elementAt(index: Int): UShort { + return get(index) +} /** * Returns a [List] that wraps the original array.