| 41 | } |
| 42 | |
| 43 | cmCMakePath cmCMakePath::GetWideExtension() const |
| 44 | { |
| 45 | auto file = this->Path.filename().string(); |
| 46 | if (file.empty() || file == "." || file == "..") { |
| 47 | return cmCMakePath{}; |
| 48 | } |
| 49 | |
| 50 | auto pos = file.find('.', file[0] == '.' ? 1 : 0); |
| 51 | if (pos != std::string::npos) { |
| 52 | return cm::string_view(file.data() + pos, file.length() - pos); |
| 53 | } |
| 54 | |
| 55 | return cmCMakePath{}; |
| 56 | } |
| 57 | |
| 58 | cmCMakePath cmCMakePath::GetNarrowStem() const |
| 59 | { |