MCPcopy Create free account
hub / github.com/BlitterStudio/amiberry / SearchForExt

Method SearchForExt

external/ImGuiFileDialog/ImGuiFileDialog.cpp:1833–1848  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1831}
1832
1833bool IGFD::FileInfos::SearchForExt(const std::string& vExt, const bool vIsCaseInsensitive, const size_t& vMaxLevel) const {
1834 if (!vExt.empty()) {
1835 const auto& ext_to_check = vIsCaseInsensitive ? Utils::LowerCaseString(vExt) : vExt;
1836 const auto& ext_levels = vIsCaseInsensitive ? fileExtLevels_optimized : fileExtLevels;
1837 if (vMaxLevel >= 1 && countExtDot >= vMaxLevel) {
1838 for (const auto& ext : ext_levels) {
1839 if (!ext.empty() && ext == ext_to_check) {
1840 return true;
1841 }
1842 }
1843 } else {
1844 return (fileExtLevels[0] == vExt);
1845 }
1846 }
1847 return false;
1848}
1849
1850bool IGFD::FileInfos::SearchForExts(const std::string& vComaSepExts, const bool vIsCaseInsensitive, const size_t& vMaxLevel) const {
1851 if (!vComaSepExts.empty()) {

Callers 2

existMethod · 0.80
FillFileStyleMethod · 0.80

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected