| 2474 | } |
| 2475 | |
| 2476 | void ImGuiTextFilter::Build() |
| 2477 | { |
| 2478 | Filters.resize(0); |
| 2479 | ImGuiTextRange input_range(InputBuf, InputBuf + strlen(InputBuf)); |
| 2480 | input_range.split(',', &Filters); |
| 2481 | |
| 2482 | CountGrep = 0; |
| 2483 | for (int i = 0; i != Filters.Size; i++) |
| 2484 | { |
| 2485 | ImGuiTextRange& f = Filters[i]; |
| 2486 | while (f.b < f.e && ImCharIsBlankA(f.b[0])) |
| 2487 | f.b++; |
| 2488 | while (f.e > f.b && ImCharIsBlankA(f.e[-1])) |
| 2489 | f.e--; |
| 2490 | if (f.empty()) |
| 2491 | continue; |
| 2492 | if (Filters[i].b[0] != '-') |
| 2493 | CountGrep += 1; |
| 2494 | } |
| 2495 | } |
| 2496 | |
| 2497 | bool ImGuiTextFilter::PassFilter(const char* text, const char* text_end) const |
| 2498 | { |
nothing calls this directly
no test coverage detected