| 3124 | } |
| 3125 | |
| 3126 | void ImGuiTextFilter::Build() |
| 3127 | { |
| 3128 | Filters.resize(0); |
| 3129 | ImGuiTextRange input_range(InputBuf, InputBuf + ImStrlen(InputBuf)); |
| 3130 | input_range.split(',', &Filters); |
| 3131 | |
| 3132 | CountGrep = 0; |
| 3133 | for (ImGuiTextRange& f : Filters) |
| 3134 | { |
| 3135 | while (f.b < f.e && ImCharIsBlankA(f.b[0])) |
| 3136 | f.b++; |
| 3137 | while (f.e > f.b && ImCharIsBlankA(f.e[-1])) |
| 3138 | f.e--; |
| 3139 | if (f.empty()) |
| 3140 | continue; |
| 3141 | if (f.b[0] != '-') |
| 3142 | CountGrep += 1; |
| 3143 | } |
| 3144 | } |
| 3145 | |
| 3146 | bool ImGuiTextFilter::PassFilter(const char* text, const char* text_end) const |
| 3147 | { |
no test coverage detected