MCPcopy Create free account
hub / github.com/aiekick/ImGuiFileDialog / SearchForExt

Method SearchForExt

ImGuiFileDialog.cpp:1771–1786  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1769}
1770
1771bool IGFD::FileInfos::SearchForExt(const std::string& vExt, const bool vIsCaseInsensitive, const size_t& vMaxLevel) const {
1772 if (!vExt.empty()) {
1773 const auto& ext_to_check = vIsCaseInsensitive ? Utils::LowerCaseString(vExt) : vExt;
1774 const auto& ext_levels = vIsCaseInsensitive ? fileExtLevels_optimized : fileExtLevels;
1775 if (vMaxLevel >= 1 && countExtDot >= vMaxLevel) {
1776 for (const auto& ext : ext_levels) {
1777 if (!ext.empty() && ext == ext_to_check) {
1778 return true;
1779 }
1780 }
1781 } else {
1782 return (fileExtLevels[0] == vExt);
1783 }
1784 }
1785 return false;
1786}
1787
1788bool IGFD::FileInfos::SearchForExts(const std::string& vComaSepExts, const bool vIsCaseInsensitive, const size_t& vMaxLevel) const {
1789 if (!vComaSepExts.empty()) {

Callers 1

FileSystemDirentClass · 0.80

Calls 1

emptyMethod · 0.80

Tested by

no test coverage detected