10#ifndef STRINGFILTER_TYPE_H
11#define STRINGFILTER_TYPE_H
57 bool IsEmpty()
const {
return this->word_index.empty(); }
60 void AddLine(
const char *) =
delete;
61 void AddLine(std::string_view str);
67 bool GetState()
const {
return this->word_matches == this->word_index.size(); }
Types related to strings.
State of a single filter word.
bool match
Already matched?
std::string word
Word to filter for.
StringFilter(const bool *case_sensitive=nullptr, bool locale_aware=true)
Constructor for filter.
bool IsEmpty() const
Check whether any filter words were entered.
uint word_matches
Summary of filter state: Number of words matched.
void SetFilterTerm(std::string_view str)
Set the term to filter on.
std::vector< WordState > word_index
Word index and filter state.
bool locale_aware
Match words using the current locale.
void ResetState()
Reset the matching state to process a new item.
const bool * case_sensitive
Match case-sensitively (usually a static variable).
bool GetState() const
Get the matching state of the current item.