| 1885 | } |
| 1886 | |
| 1887 | void ImGuiTextFilter::Build() |
| 1888 | { |
| 1889 | Filters.resize(0); |
| 1890 | TextRange input_range(InputBuf, InputBuf+strlen(InputBuf)); |
| 1891 | input_range.split(',', &Filters); |
| 1892 | |
| 1893 | CountGrep = 0; |
| 1894 | for (int i = 0; i != Filters.Size; i++) |
| 1895 | { |
| 1896 | TextRange& f = Filters[i]; |
| 1897 | while (f.b < f.e && ImCharIsBlankA(f.b[0])) |
| 1898 | f.b++; |
| 1899 | while (f.e > f.b && ImCharIsBlankA(f.e[-1])) |
| 1900 | f.e--; |
| 1901 | if (f.empty()) |
| 1902 | continue; |
| 1903 | if (Filters[i].b[0] != '-') |
| 1904 | CountGrep += 1; |
| 1905 | } |
| 1906 | } |
| 1907 | |
| 1908 | bool ImGuiTextFilter::PassFilter(const char* text, const char* text_end) const |
| 1909 | { |
nothing calls this directly
no test coverage detected