|
#pragma once
/**
2005-1-17 12:01
*/
inline void GetFileBaseName(/*[in,out]*/LPTSTR szFile/*,LPTSTR pszBasename*/)
{
//TCHAR* pszBasename = new TCHAR[strlen(szFile)+5];
//lstrcpy( pszBasename,szFile);
LPTSTR pszBasename=szFile;
int i = lstrlen(pszBasename)-1;
for(;i > 0 && pszBasename[i] != _T('.') && pszBasename[i] != _T('/')
&& pszBasename[i] != _T('\\');
--i) {}
if( pszBasename[i] == _T('.') )
pszBasename[i] = _T('\0');
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
My name is Yanxueming,i live in Chengdu China.Graduated from UESTC in 1999.