toTypedArray

fun ByteArray.toTypedArray(): Array<Byte> (source)
fun ShortArray.toTypedArray(): Array<Short> (source)
fun IntArray.toTypedArray(): Array<Int> (source)
fun LongArray.toTypedArray(): Array<Long> (source)
fun FloatArray.toTypedArray(): Array<Float> (source)
fun DoubleArray.toTypedArray(): Array<Double> (source)
fun BooleanArray.toTypedArray(): Array<Boolean> (source)
fun CharArray.toTypedArray(): Array<Char> (source)

Returns a typed object array containing all of the elements of this primitive array.

inline fun <reified T> Collection<T>.toTypedArray(): Array<T> (source)

Returns a typed array containing all of the elements of this collection.

Allocates an array of runtime type T having its size equal to the size of this collection and populates the array with the elements of this collection.