TArray::RemoveSingleSwap

Syntax

int32 RemoveSingleSwap
(
    const ElementType & Item,
    bool bAllowShrinking
)

Remarks

Removes the first occurrence of the specified item in the array. This version is much more efficient O(Count) instead of O(ArrayNum), but does not preserve the order

Returns

The number of items removed. For RemoveSingleItem, this is always either 0 or 1.

Parameters

Parameter

Description

Item

The item to remove

See Also

References

Module

Core

Header

Runtime/Core/Public/Containers/Array.h