![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
Functions | |
| template<typename T > | |
| int | CountValid (const TArray< T > &Data, const TFunction< bool(T)> &Predicate, int MaxIndex=-1, int StartIndex=0) |
| template<typename T > | |
| int | FilterInPlace (TArray< T > &Data, const TFunction< bool(T)> &Predicate, int MaxIndex=-1, int StartIndex=0) |
| template<typename T , typename EnumerableType > | |
| void | AppendElements (TArray< T > &AppendTo, EnumerableType Enumerable) |
Utility functions for processing arrays of objects
| void BufferUtil::AppendElements | ( | TArray< T > & | AppendTo, |
| EnumerableType | Enumerable | ||
| ) |
Append enumerable elements to an array
| Data | array to append to |
| Enumerable | object that can be iterated over with a range-based for loop |
| int BufferUtil::CountValid | ( | const TArray< T > & | Data, |
| const TFunction< bool(T)> & | Predicate, | ||
| int | MaxIndex = -1, |
||
| int | StartIndex = 0 |
||
| ) |
Count number of elements in array (or within requested range) that pass Predicate test
| Data | Array to process |
| Predicate | filtering function, return true indicates valid |
| MaxIndex | optional maximum index in array (exclusive, default is to use array size) |
| StartIndex | optional start index in array (default 0) |
| int BufferUtil::FilterInPlace | ( | TArray< T > & | Data, |
| const TFunction< bool(T)> & | Predicate, | ||
| int | MaxIndex = -1, |
||
| int | StartIndex = 0 |
||
| ) |
Removes elements of array (or within requested range) that do not pass Predicate, by shifting forward. Does not remove remaining elements
| Data | Array to process |
| Predicate | filtering function, return true indicates valid |
| MaxIndex | optional maximum index in array (exclusive, default is to use array size) |
| StartIndex | optional start index in array (default 0) |