fix some bug

This commit is contained in:
QIDI TECH
2025-09-25 12:07:30 +08:00
parent 8177bf8912
commit 6ec016a6f8
12 changed files with 103 additions and 44 deletions

View File

@@ -858,6 +858,16 @@ inline std::string filter_characters(const std::string& str, const std::string&
return filteredStr;
}
//y71
inline std::string get_pure_file_name(const std::string &file_path)
{
size_t pos_last_delimiter = file_path.find_last_of("/\\");
size_t pos_point = file_path.find_last_of('.');
size_t offset = pos_last_delimiter + 1;
size_t count = pos_point - pos_last_delimiter - 1;
return file_path.substr(offset, count);
}
void save_string_file(const boost::filesystem::path& p, const std::string& str);
void load_string_file(const boost::filesystem::path& p, std::string& str);