! returns the basename without extension */
| 70 | |
| 71 | /*! returns the basename without extension */ |
| 72 | std::string FileName::name() const { |
| 73 | size_t start = filename.find_last_of(path_sep); |
| 74 | if (start == std::string::npos) start = 0; else start++; |
| 75 | size_t end = filename.find_last_of('.'); |
| 76 | if (end == std::string::npos || end < start) end = filename.size(); |
| 77 | return filename.substr(start, end - start); |
| 78 | } |
| 79 | |
| 80 | /*! replaces the extension */ |
| 81 | FileName FileName::setExt(const std::string& ext) const { |