subtract

Common
JVM
JS
Native
1.0
infix fun <T> Array<out T>.subtract(
    other: Iterable<T>
): Set<T>
infix fun ByteArray.subtract(
    other: Iterable<Byte>
): Set<Byte>
infix fun ShortArray.subtract(
    other: Iterable<Short>
): Set<Short>
infix fun IntArray.subtract(other: Iterable<Int>): Set<Int>
infix fun LongArray.subtract(
    other: Iterable<Long>
): Set<Long>
infix fun FloatArray.subtract(
    other: Iterable<Float>
): Set<Float>
infix fun DoubleArray.subtract(
    other: Iterable<Double>
): Set<Double>
infix fun BooleanArray.subtract(
    other: Iterable<Boolean>
): Set<Boolean>
infix fun CharArray.subtract(
    other: Iterable<Char>
): Set<Char>

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.

Common
JVM
JS
Native
1.0
infix fun <T> Iterable<T>.subtract(
    other: Iterable<T>
): Set<T>

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.