| 27 | extern bool resolve_path(std::filesystem::path &path, std::error_code &ec); |
| 28 | |
| 29 | static 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 | } |
| 37 | static 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'|'; |
no outgoing calls
no test coverage detected