![]() |
ezEngine Release 26.9
|
A helper class to implement a multi-part, case-insensitive search pattern filter with support for exclusions. More...
#include <SearchPatternFilter.h>
Public Member Functions | |
| void | SetSearchText (ezStringView sSearchText) |
| Sets the search text and splits it into its part for faster checks. | |
| const ezString & | GetSearchText () const |
| Returns the current search text. | |
| bool | IsEmpty () const |
| Returns true if the search text is empty. | |
| bool | ContainsExclusions () const |
| Returns true if the filter contains any exclusion patterns. | |
| bool | PassesFilters (ezStringView sText) const |
| Determines whether the given text matches the filter patterns. | |
A helper class to implement a multi-part, case-insensitive search pattern filter with support for exclusions.
The search text is split into multiple parts by spaces. A text passes the filter if it contains all parts. The check is always case insensitive and the order of the parts does not matter. It is also possible to exclude parts by prefixing them with a minus. E.g. "com mesh" would pass all texts that contain "com" and "mesh" like ezMeshComponent. "com -mesh" would pass ezLightComponent but would fail ezMeshComponent.