MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / PassFilter

Method PassFilter

3rdparty/imgui/src/imgui.cpp:3105–3136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3103}
3104
3105bool ImGuiTextFilter::PassFilter(const char* text, const char* text_end) const
3106{
3107 if (Filters.Size == 0)
3108 return true;
3109
3110 if (text == NULL)
3111 text = text_end = "";
3112
3113 for (const ImGuiTextRange& f : Filters)
3114 {
3115 if (f.b == f.e)
3116 continue;
3117 if (f.b[0] == '-')
3118 {
3119 // Subtract
3120 if (ImStristr(text, text_end, f.b + 1, f.e) != NULL)
3121 return false;
3122 }
3123 else
3124 {
3125 // Grep
3126 if (ImStristr(text, text_end, f.b, f.e) != NULL)
3127 return true;
3128 }
3129 }
3130
3131 // Implicit * grep
3132 if (CountGrep == 0)
3133 return true;
3134
3135 return false;
3136}
3137
3138//-----------------------------------------------------------------------------
3139// [SECTION] ImGuiTextBuffer, ImGuiTextIndex

Callers 5

ShowStyleEditorMethod · 0.80
DrawFunction · 0.80
IsNodePassingFilterMethod · 0.80

Calls 1

ImStristrFunction · 0.85

Tested by

no test coverage detected