AnsiString PathUtil::GetFileNameWithoutExtension(const AnsiString &path) { AnsiString fileName = GetFileName(path); size_t pos = fileName.find_last_of('.'); if (pos == AnsiString::npos) return fileName; else return fileName.substr(0, pos); }
AnsiString PathUtil::GetFileName(const AnsiString &path) { AnsiString newPath = UnifySeparators(path); size_t pos = newPath.find_last_of(L'/'); if (pos == AnsiString::npos) return path; else return newPath.substr(pos + 1); }