MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / hasExtension

Function hasExtension

src/openrct2/profiling/Profiling.cpp:279–288  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

277 }
278
279 bool hasExtension(const std::string& path, const std::string& ext)
280 {
281 if (path.size() < ext.size())
282 return false;
283
284 // Case insensitive extension comparison
285 auto pathEnd = path.substr(path.size() - ext.size());
286 std::transform(pathEnd.begin(), pathEnd.end(), pathEnd.begin(), ::tolower);
287 return pathEnd == ext;
288 }
289 } // namespace
290
291 bool exportData(const std::string& filePath)

Callers 1

exportDataFunction · 0.85

Calls 3

endMethod · 0.65
sizeMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected