This commit is contained in:
2022-01-03 09:01:21 +08:00
parent 65b9f06319
commit 49ae127b16
8 changed files with 218 additions and 0 deletions

View File

@@ -530,3 +530,8 @@ bool fileop::listdir(std::string path, std::list<std::string>& filelist, bool ig
return true;
#endif
}
std::string fileop::filename(std::string path) {
auto loc = path.find_last_of('.');
return loc == -1 ? path : path.substr(0, loc);
}