LastIndexOfImpl()

System::MemoryExtensions::Details::LastIndexOfImpl(const ReadOnlySpan<T>&, int32_t, const T&) function

Finds the last index of a value in a span.

template<typename T> int32_t System::MemoryExtensions::Details::LastIndexOfImpl(const ReadOnlySpan<T> &searchSpace, int32_t length, const T &value)

Template parameters

ParameterDescription
TType of elements in span

Arguments

ParameterTypeDescription
searchSpaceconst ReadOnlySpan<T>&Span to search
lengthint32_tLength to search within
valueconst T&Value to find

Return Value

Last index of the value, or -1 if not found

See Also