| 2412 | } |
| 2413 | |
| 2414 | void ImGuiTextFilter::Build() |
| 2415 | { |
| 2416 | Filters.resize(0); |
| 2417 | ImGuiTextRange input_range(InputBuf, InputBuf + strlen(InputBuf)); |
| 2418 | input_range.split(',', &Filters); |
| 2419 | |
| 2420 | CountGrep = 0; |
| 2421 | for (int i = 0; i != Filters.Size; i++) |
| 2422 | { |
| 2423 | ImGuiTextRange& f = Filters[i]; |
| 2424 | while (f.b < f.e && ImCharIsBlankA(f.b[0])) |
| 2425 | f.b++; |
| 2426 | while (f.e > f.b && ImCharIsBlankA(f.e[-1])) |
| 2427 | f.e--; |
| 2428 | if (f.empty()) |
| 2429 | continue; |
| 2430 | if (Filters[i].b[0] != '-') |
| 2431 | CountGrep += 1; |
| 2432 | } |
| 2433 | } |
| 2434 | |
| 2435 | bool ImGuiTextFilter::PassFilter(const char* text, const char* text_end) const |
| 2436 | { |
nothing calls this directly
no test coverage detected