| 116 | } |
| 117 | |
| 118 | std::string Path::getFilenameExtension(const std::string &path, bool lowercase) |
| 119 | { |
| 120 | const std::string::size_type dotLocation = path.find_last_of('.'); |
| 121 | if (dotLocation == std::string::npos) |
| 122 | return ""; |
| 123 | |
| 124 | std::string extension = path.substr(dotLocation); |
| 125 | if (lowercase || caseInsensitiveFilesystem()) { |
| 126 | // on a case insensitive filesystem the case doesn't matter so |
| 127 | // let's return the extension in lowercase |
| 128 | strTolower(extension); |
| 129 | } |
| 130 | return extension; |
| 131 | } |
| 132 | |
| 133 | std::string Path::getFilenameExtensionInLowerCase(const std::string &path) |
| 134 | { |
nothing calls this directly
no test coverage detected