MCPcopy Create free account
hub / github.com/crosire/reshade / string_contains

Function string_contains

source/runtime_gui.cpp:29–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27extern bool resolve_path(std::filesystem::path &path, std::error_code &ec);
28
29static bool string_contains(const std::string_view text, const std::string_view filter)
30{
31 return filter.empty() ||
32 std::search(text.cbegin(), text.cend(), filter.cbegin(), filter.cend(),
33 [](const char c1, const char c2) { // Search case-insensitive
34 return (('a' <= c1 && c1 <= 'z') ? static_cast<char>(c1 - ' ') : c1) == (('a' <= c2 && c2 <= 'z') ? static_cast<char>(c2 - ' ') : c2);
35 }) != text.cend();
36}
37static auto is_invalid_path_element(ImGuiInputTextCallbackData *data) -> int
38{
39 return data->EventChar == L'\"' || data->EventChar == L'*' || data->EventChar == L':' || data->EventChar == L'<' || data->EventChar == L'>' || data->EventChar == L'?' || data->EventChar == L'|';

Callers 3

draw_gui_homeMethod · 0.85
draw_gui_logMethod · 0.85
draw_gui_addonsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected