TArray::FilterByPredicate

Filters the elements in the array based on a predicate functor.

Windows
MacOS
Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Containers/Array.h

Include

#include "Containers/Array.h"

Syntax

template<typename Predicate>
TArray< ElementType > FilterByPredicate
(
    Predicate Pred
) const

Remarks

Filters the elements in the array based on a predicate functor.

Returns

TArray with the same type as this object which contains the subset of elements for which the functor returns true.

Parameters

Parameter

Description

Pred

The functor to apply to each element.

See Also

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss