MCPcopy Create free account
hub / github.com/Overload-Technologies/Overload / PassFilter

Method PassFilter

Dependencies/ImGui/src/imgui.cpp:2934–2965  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2932}
2933
2934bool ImGuiTextFilter::PassFilter(const char* text, const char* text_end) const
2935{
2936 if (Filters.Size == 0)
2937 return true;
2938
2939 if (text == NULL)
2940 text = text_end = "";
2941
2942 for (const ImGuiTextRange& f : Filters)
2943 {
2944 if (f.b == f.e)
2945 continue;
2946 if (f.b[0] == '-')
2947 {
2948 // Subtract
2949 if (ImStristr(text, text_end, f.b + 1, f.e) != NULL)
2950 return false;
2951 }
2952 else
2953 {
2954 // Grep
2955 if (ImStristr(text, text_end, f.b, f.e) != NULL)
2956 return true;
2957 }
2958 }
2959
2960 // Implicit * grep
2961 if (CountGrep == 0)
2962 return true;
2963
2964 return false;
2965}
2966
2967//-----------------------------------------------------------------------------
2968// [SECTION] ImGuiTextBuffer, ImGuiTextIndex

Callers 5

ShowStyleEditorMethod · 0.80
DrawFunction · 0.80
DrawMethod · 0.80

Calls 1

ImStristrFunction · 0.85

Tested by

no test coverage detected