kotlin-stdlib / kotlin.collections / toSet toSet Common JVM JS Native 1.0 fun < T > Array < out T > . toSet ( ) : Set < T > (source) fun ByteArray . toSet ( ) : Set < Byte > (source) fun ShortArray . toSet ( ) : Set < Short > (source) fun IntArray . toSet ( ) : Set < Int > (source) fun LongArray . toSet ( ) : Set < Long > (source) fun FloatArray . toSet ( ) : Set < Float > (source) fun DoubleArray . toSet ( ) : Set < Double > (source) fun BooleanArray . toSet ( ) : Set < Boolean > (source) fun CharArray . toSet ( ) : Set < Char > (source) Returns a Set of all elements. The returned set preserves the element iteration order of the original array. Common JVM JS Native 1.0 fun < T > Iterable < T > . toSet ( ) : Set < T > (source) Returns a Set of all elements. The returned set preserves the element iteration order of the original collection.