16/04/23 07:51:54.45 1OvIZwV0.net
using std::string;
string get_file_prefix(const std::string& filename) {
string temp(filename);
string::size_type pos = temp.find_last_of(".");
if (pos != string::npos) {
temp = temp.substr(0, pos);
}
pos = temp.find_last_of("/\\");
if (pos != string::npos) {
temp = temp.substr(pos + 1);
}
return temp;
}
ex)
string in_filename(argv[1]);
string prefix = get_file_prefix(in_filename);