MCPcopy Create free account
hub / github.com/MrNeRF/LichtFeld-Studio / GetFileExtension

Method GetFileExtension

external/zep/src/buffer.cpp:572–584  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

570 }
571
572 std::string ZepBuffer::GetFileExtension() const {
573 std::string ext;
574 if (GetFilePath().has_filename() && GetFilePath().filename().has_extension()) {
575 ext = string_tolower(GetFilePath().filename().extension().string());
576 } else {
577 auto str = GetName();
578 size_t dot_pos = str.find_last_of(".");
579 if (dot_pos != std::string::npos) {
580 ext = string_tolower(str.substr(dot_pos, str.length() - dot_pos));
581 }
582 }
583 return ext;
584 }
585
586 // Basic load support; read a file if it's present, but keep
587 // the file path in case you want to write later

Callers 1

UpdateLineSpansMethod · 0.80

Calls 3

string_tolowerFunction · 0.85
stringMethod · 0.80
lengthMethod · 0.80

Tested by

no test coverage detected