@return the file extension, i.e. "ext" if input is "path/base0123.ext"
| 87 | |
| 88 | /// @return the file extension, i.e. "ext" if input is "path/base0123.ext" |
| 89 | inline std::string getExt(const std::string &str) |
| 90 | { |
| 91 | const size_t pos = str.find_last_of('.'); |
| 92 | return pos >= str.length() ? "" : str.substr(pos + 1); |
| 93 | } |
| 94 | |
| 95 | /// @brief Turns all characters in a string into lower case |
| 96 | inline std::string &toLowerCase(std::string &str) |