subtract

infix fun <T> Array<out T>.subtract(other: Iterable<T>): Set<T>(source)
infix fun ByteArray.subtract(other: Iterable<Byte>): Set<Byte>(source)
infix fun IntArray.subtract(other: Iterable<Int>): Set<Int>(source)
infix fun LongArray.subtract(other: Iterable<Long>): Set<Long>(source)
infix fun CharArray.subtract(other: Iterable<Char>): Set<Char>(source)

Returns a set containing all elements that are contained by this array and not contained by the specified collection.

The returned set preserves the element iteration order of the original array.

Since Kotlin

1.0

infix fun <T> Iterable<T>.subtract(other: Iterable<T>): Set<T>(source)

Returns a set containing all elements that are contained by this collection and not contained by the specified collection.

The returned set preserves the element iteration order of the original collection.

Since Kotlin

1.0