CString strTemp;
//去掉最後一個字符
strTemp = strTemp.Left(strTemp.GetLength()-1);
//或
strTemp.SetAt(strTemp.GetLength()-1, 0);
//字符、字符串替換函數
//刪除strTemp中某個字符或字符串
strTemp.Replace('*', '');//strTemp.Remove('*');
strTemp.Replace("123", "");
//替換strTemp中的某個字符或字符串
strTemp.Replace('*', '?');
strTemp.Replace("//", "////");//單斜槓替換成雙斜槓
此外還有Left,Right,Mid,Find,ReverseFind,MakeLower,MakeUpper,MakeReverse,Delete(nIndex, nCount=1)