Algo::IndexOf

Returns the index of the first element in the range which is equal to the given value.

Windows
MacOS
Linux

References

Module

Core

Header

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

Include

#include "Algo/IndexOf.h"

Syntax

namespace Algo
{
    template<typename RangeType, typename ValueType>
    auto Algo::IndexOf
    (
        RangeType && Range,
        const ValueType & Value
    )
}

Remarks

Returns the index of the first element in the range which is equal to the given value.

Returns

The index of the first element found, or (SizeType)-1 if none was found (where SizeType = decltype(GetNum(Range)))

Parameters

Parameter

Description

Range

The range to search.

Value

The value to search for.

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