Function: IterOnce

public:
template <typename T>
TIterOnce<T> IterOnce(
    T Value
);

Iterator that yields one value only once.

Useful to use for yielding "leading/trailing/separator" values in chains of multiple iterators.

Example

// [0, 1, 2, 3, 4, -1, 5, 6, 7, 8, 9]
const TArray<int> Result = IterRange(0, 5).Chain(IterOnce(-1)).Chain(IterRange(5, 10)).CollectArray();

Arguments

  • Value

    T Value
    

    Value that iterator should yield once.


Documentation built with Unreal-Doc v1.0.8 tool by PsichiX