| 3083 | } |
| 3084 | |
| 3085 | void ImGuiTextFilter::Build() |
| 3086 | { |
| 3087 | Filters.resize(0); |
| 3088 | ImGuiTextRange input_range(InputBuf, InputBuf + ImStrlen(InputBuf)); |
| 3089 | input_range.split(',', &Filters); |
| 3090 | |
| 3091 | CountGrep = 0; |
| 3092 | for (ImGuiTextRange& f : Filters) |
| 3093 | { |
| 3094 | while (f.b < f.e && ImCharIsBlankA(f.b[0])) |
| 3095 | f.b++; |
| 3096 | while (f.e > f.b && ImCharIsBlankA(f.e[-1])) |
| 3097 | f.e--; |
| 3098 | if (f.empty()) |
| 3099 | continue; |
| 3100 | if (f.b[0] != '-') |
| 3101 | CountGrep += 1; |
| 3102 | } |
| 3103 | } |
| 3104 | |
| 3105 | bool ImGuiTextFilter::PassFilter(const char* text, const char* text_end) const |
| 3106 | { |
nothing calls this directly
no test coverage detected