* Removes the extension from a filename. * @param filename Original filename. * @return Filename without the extension. */
| 705 | * @return Filename without the extension. |
| 706 | */ |
| 707 | std::string noExt(const std::string &filename) |
| 708 | { |
| 709 | size_t dot = filename.find_last_of('.'); |
| 710 | if (dot == std::string::npos) |
| 711 | { |
| 712 | return filename; |
| 713 | } |
| 714 | return filename.substr(0, filename.find_last_of('.')); |
| 715 | } |
| 716 | |
| 717 | /** |
| 718 | * Gets the current locale of the system in language-COUNTRY format. |
no outgoing calls
no test coverage detected