| 44 | } |
| 45 | |
| 46 | void splitPath(const std::string& path, std::string& dirname, std::string& filename) |
| 47 | { |
| 48 | auto delimiter = path.rfind("/"); |
| 49 | if(delimiter == path.npos) { |
| 50 | delimiter = path.rfind("\\"); |
| 51 | } |
| 52 | if(delimiter != path.npos) { |
| 53 | delimiter++; |
| 54 | dirname = path.substr(0, delimiter); |
| 55 | filename = path.substr(delimiter); |
| 56 | } else { |
| 57 | dirname = "./"; |
| 58 | filename = path; |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | bool caseInsensitiveCompare(const std::string& str1, const std::string& str2) |
| 63 | { |