toTypedArray

inline fun <T> Iterable<T>.toTypedArray(): Array<out T>(source)

Copies an iterable's elements into an array.

Return

a newly-allocated array into which all the elements of the iterable have been copied

See also

Parameters

T

the type of the elements


inline fun <T> Iterator<T>.toTypedArray(): Array<out T>(source)

Copies an iterator's elements into an array. The iterator will be left exhausted: its hasNext method will return false.

Return

a newly-allocated array into which all the elements of the iterator have been copied

See also

Parameters

T

the type of the elements