Example #1
0
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);
}
Example #2
0
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);
}