?? cpathstring.cpp
字號(hào):
#include "CPathString.h"
CPathString::CPathString()
{}
CPathString::~CPathString()
{}
//
// Returns a pointer to the file name of a file path
//
char* CPathString::ExtractFileName(char* szDir)
{
char* pCH;
pCH = (char*)((DWORD)szDir + lstrlen(szDir) - 1);
while (*pCH != '\\')
pCH--;
pCH++;
return pCH;
}
//
// Pastes a NUL at the start of the file name of the specified file path
//
void CPathString::PathToDir(char* szPath)
{
char *pCH;
pCH = szPath;
pCH += lstrlen(szPath);
while (*pCH != '\\')
--pCH;
*pCH = 0;
return;
}
//
// Pastes a backslash at the end of a string if there isn't already one
//
void CPathString::ForceEndBackslash(char* szStr)
{
char *pCH;
pCH = (char*)((DWORD)szStr + lstrlen(szStr) - 1);
if (*pCH != '\\')
lstrcat(szStr, "\\");
return;
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -