MCPcopy Create free account
hub / github.com/Snapchat/Valdi / getFileExtension

Method getFileExtension

valdi_core/src/valdi_core/cpp/Utils/PathUtils.cpp:219–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

217}
218
219std::string_view Path::getFileExtension() const {
220 auto lastComponent = getLastComponent();
221 auto fileExtensionIndex = lastComponent.find_last_of('.');
222 if (fileExtensionIndex == std::string_view::npos) {
223 return std::string_view();
224 }
225
226 return lastComponent.substr(fileExtensionIndex + 1);
227}
228
229bool Path::empty() const {
230 return _components.empty();

Callers 3

TESTFunction · 0.80
processImageFunction · 0.80
convertImageFunction · 0.80

Calls 2

getLastComponentFunction · 0.85
substrMethod · 0.80

Tested by 1

TESTFunction · 0.64