MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / getSearchName

Function getSearchName

Source/3rdParty/Zip/ZipUtils.cpp:114–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112}
113
114static std::string getSearchName(const std::string& filename) {
115 std::string cleaned = Slice(filename).toLower();
116 if (!cleaned.empty()) {
117 size_t pos = 0;
118 while ((pos = cleaned.find("\\", pos)) != std::string::npos) {
119 cleaned[pos] = '/';
120 }
121 while (!cleaned.empty() && cleaned.back() == '/') {
122 cleaned.erase(--cleaned.end());
123 }
124 if (cleaned == "."sv) cleaned.clear();
125 }
126 return cleaned;
127}
128
129static bool isDirectChildPath(const std::string& entry, const std::string& parent) {
130 if (parent.empty()) return !entry.empty();

Callers 8

getDirEntriesMethod · 0.85
getAllFilesMethod · 0.85
fileExistsMethod · 0.85
isFolderMethod · 0.85
getFileSizeMethod · 0.85
getFileDataUnsafeMethod · 0.85
getFileDataAsStringMethod · 0.85
getFileDataByChunksMethod · 0.85

Calls 8

toLowerMethod · 0.80
findMethod · 0.65
clearMethod · 0.65
SliceClass · 0.50
emptyMethod · 0.45
backMethod · 0.45
eraseMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected