toVararg

inline fun <T> Array<out T>.toVararg(): Pair<T, Array<out T>>

Splits this Array into the first element and the rest as Array<out T>.

This way you can pass it to a function which expects x: T, vararg otherX: T.

Since

3.1.0


inline fun <T> Iterable<T>.toVararg(): Pair<T, Array<out T>>

Splits this Iterable into the first element and the rest as Array<out T>.

This way you can pass it to a function which expects x: T, vararg otherX: T.

Since

3.1.0


inline fun <T> Sequence<T>.toVararg(): Pair<T, Array<out T>>

Splits this Sequence into the first element and the rest as Array<out T>.

This way you can pass it to a function which expects x: T, vararg otherX: T.

Since

3.1.0


@JvmName(name = "toVarargBoolean")
fun Iterable<Boolean>.toVararg(): Pair<Boolean, BooleanArray>

Splits this Iterable into the first element and the rest as BooleanArray.

This way you can pass it to a function which expects x: Boolean, vararg otherX: Boolean.

Since

3.1.0


Splits this Array into the first element and the rest as BooleanArray.

This way you can pass it to a function which expects x: Boolean, vararg otherX: Boolean.

Since

3.1.0


@JvmName(name = "toVarargBoolean")
fun Sequence<Boolean>.toVararg(): Pair<Boolean, BooleanArray>

Splits this Sequence into the first element and the rest as BooleanArray.

This way you can pass it to a function which expects x: Boolean, vararg otherX: Boolean.

Since

3.1.0


Splits this BooleanArray into the first element and the rest as BooleanArray.

This way you can pass it to a function which expects x: Boolean, vararg otherX: Boolean.

Since

3.1.0


@JvmName(name = "toVarargByte")
fun Iterable<Byte>.toVararg(): Pair<Byte, ByteArray>

Splits this Iterable into the first element and the rest as ByteArray.

This way you can pass it to a function which expects x: Byte, vararg otherX: Byte.

Since

3.1.0


Splits this Array into the first element and the rest as ByteArray.

This way you can pass it to a function which expects x: Byte, vararg otherX: Byte.

Since

3.1.0


@JvmName(name = "toVarargByte")
fun Sequence<Byte>.toVararg(): Pair<Byte, ByteArray>

Splits this Sequence into the first element and the rest as ByteArray.

This way you can pass it to a function which expects x: Byte, vararg otherX: Byte.

Since

3.1.0


Splits this ByteArray into the first element and the rest as ByteArray.

This way you can pass it to a function which expects x: Byte, vararg otherX: Byte.

Since

3.1.0


@JvmName(name = "toVarargChar")
fun Iterable<Char>.toVararg(): Pair<Char, CharArray>

Splits this Iterable into the first element and the rest as CharArray.

This way you can pass it to a function which expects x: Char, vararg otherX: Char.

Since

3.1.0


Splits this Array into the first element and the rest as CharArray.

This way you can pass it to a function which expects x: Char, vararg otherX: Char.

Since

3.1.0


@JvmName(name = "toVarargChar")
fun Sequence<Char>.toVararg(): Pair<Char, CharArray>

Splits this Sequence into the first element and the rest as CharArray.

This way you can pass it to a function which expects x: Char, vararg otherX: Char.

Since

3.1.0


Splits this CharArray into the first element and the rest as CharArray.

This way you can pass it to a function which expects x: Char, vararg otherX: Char.

Since

3.1.0


@JvmName(name = "toVarargShort")
fun Iterable<Short>.toVararg(): Pair<Short, ShortArray>

Splits this Iterable into the first element and the rest as ShortArray.

This way you can pass it to a function which expects x: Short, vararg otherX: Short.

Since

3.1.0


Splits this Array into the first element and the rest as ShortArray.

This way you can pass it to a function which expects x: Short, vararg otherX: Short.

Since

3.1.0


@JvmName(name = "toVarargShort")
fun Sequence<Short>.toVararg(): Pair<Short, ShortArray>

Splits this Sequence into the first element and the rest as ShortArray.

This way you can pass it to a function which expects x: Short, vararg otherX: Short.

Since

3.1.0


Splits this ShortArray into the first element and the rest as ShortArray.

This way you can pass it to a function which expects x: Short, vararg otherX: Short.

Since

3.1.0


@JvmName(name = "toVarargInt")
fun Iterable<Int>.toVararg(): Pair<Int, IntArray>

Splits this Iterable into the first element and the rest as IntArray.

This way you can pass it to a function which expects x: Int, vararg otherX: Int.

Since

3.1.0


Splits this Array into the first element and the rest as IntArray.

This way you can pass it to a function which expects x: Int, vararg otherX: Int.

Since

3.1.0


@JvmName(name = "toVarargInt")
fun Sequence<Int>.toVararg(): Pair<Int, IntArray>

Splits this Sequence into the first element and the rest as IntArray.

This way you can pass it to a function which expects x: Int, vararg otherX: Int.

Since

3.1.0


Splits this IntArray into the first element and the rest as IntArray.

This way you can pass it to a function which expects x: Int, vararg otherX: Int.

Since

3.1.0


@JvmName(name = "toVarargLong")
fun Iterable<Long>.toVararg(): Pair<Long, LongArray>

Splits this Iterable into the first element and the rest as LongArray.

This way you can pass it to a function which expects x: Long, vararg otherX: Long.

Since

3.1.0


Splits this Array into the first element and the rest as LongArray.

This way you can pass it to a function which expects x: Long, vararg otherX: Long.

Since

3.1.0


@JvmName(name = "toVarargLong")
fun Sequence<Long>.toVararg(): Pair<Long, LongArray>

Splits this Sequence into the first element and the rest as LongArray.

This way you can pass it to a function which expects x: Long, vararg otherX: Long.

Since

3.1.0


Splits this LongArray into the first element and the rest as LongArray.

This way you can pass it to a function which expects x: Long, vararg otherX: Long.

Since

3.1.0


@JvmName(name = "toVarargFloat")
fun Iterable<Float>.toVararg(): Pair<Float, FloatArray>

Splits this Iterable into the first element and the rest as FloatArray.

This way you can pass it to a function which expects x: Float, vararg otherX: Float.

Since

3.1.0


Splits this Array into the first element and the rest as FloatArray.

This way you can pass it to a function which expects x: Float, vararg otherX: Float.

Since

3.1.0


@JvmName(name = "toVarargFloat")
fun Sequence<Float>.toVararg(): Pair<Float, FloatArray>

Splits this Sequence into the first element and the rest as FloatArray.

This way you can pass it to a function which expects x: Float, vararg otherX: Float.

Since

3.1.0


Splits this FloatArray into the first element and the rest as FloatArray.

This way you can pass it to a function which expects x: Float, vararg otherX: Float.

Since

3.1.0


@JvmName(name = "toVarargDouble")
fun Iterable<Double>.toVararg(): Pair<Double, DoubleArray>

Splits this Iterable into the first element and the rest as DoubleArray.

This way you can pass it to a function which expects x: Double, vararg otherX: Double.

Since

3.1.0


Splits this Array into the first element and the rest as DoubleArray.

This way you can pass it to a function which expects x: Double, vararg otherX: Double.

Since

3.1.0


@JvmName(name = "toVarargDouble")
fun Sequence<Double>.toVararg(): Pair<Double, DoubleArray>

Splits this Sequence into the first element and the rest as DoubleArray.

This way you can pass it to a function which expects x: Double, vararg otherX: Double.

Since

3.1.0


Splits this DoubleArray into the first element and the rest as DoubleArray.

This way you can pass it to a function which expects x: Double, vararg otherX: Double.

Since

3.1.0