Algo::ReplaceIf

Replaces all elements that satisfy the predicate with the given value.

Windows
MacOS
Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Algo/Replace.h

Include

#include "Algo/Replace.h"

Syntax

namespace Algo
{
    template<typename RangeType, typename ValueType, typename PredicateType>
    void Algo::ReplaceIf
    (
        RangeType && Range,
        PredicateType InPred,
        const ValueType & InNew
    )
}

Remarks

Replaces all elements that satisfy the predicate with the given value.

Parameters

Parameter

Description

Range

The range to search and modify in-place.

InPred

The predicate to apply to each element.

InNew

The value to copy in as a replacement for each element satisfying the predicate.

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