| 2536 | } |
| 2537 | |
| 2538 | void ImGuiTextFilter::Build() |
| 2539 | { |
| 2540 | Filters.resize(0); |
| 2541 | ImGuiTextRange input_range(InputBuf, InputBuf + strlen(InputBuf)); |
| 2542 | input_range.split(',', &Filters); |
| 2543 | |
| 2544 | CountGrep = 0; |
| 2545 | for (ImGuiTextRange& f : Filters) |
| 2546 | { |
| 2547 | while (f.b < f.e && ImCharIsBlankA(f.b[0])) |
| 2548 | f.b++; |
| 2549 | while (f.e > f.b && ImCharIsBlankA(f.e[-1])) |
| 2550 | f.e--; |
| 2551 | if (f.empty()) |
| 2552 | continue; |
| 2553 | if (f.b[0] != '-') |
| 2554 | CountGrep += 1; |
| 2555 | } |
| 2556 | } |
| 2557 | |
| 2558 | bool ImGuiTextFilter::PassFilter(const char* text, const char* text_end) const |
| 2559 | { |
no test coverage detected