Return basename without extention.
| 102 | |
| 103 | /// Return basename without extention. |
| 104 | std::string get_basename_without_ext(const std::string file_name) |
| 105 | { |
| 106 | std::string dir; |
| 107 | std::string basename; |
| 108 | parse_path(file_name, dir, basename); |
| 109 | |
| 110 | size_t pos = basename.find_last_of('.'); |
| 111 | if (pos == 0u) { |
| 112 | return basename; |
| 113 | } |
| 114 | return basename.substr(0, pos); |
| 115 | } |
| 116 | |
| 117 | /** |
| 118 | * This automatically attaches the directory deliminator at the end of the given |
no test coverage detected