mfc编程中trimleft是什么函数
的有关信息介绍如下:针对windows平台的CString::TrimLeft(LPCTSTR lpszTargets)函数,在unix平台下自己增加该功能函数,下面是微软提供的TrimLeft函数源码:C/C++ code void CString::TrimLeft(LPCTSTR lpszTargets){ // if we're not trimming anything, we're not doing any work if (SafeStrlen(lpszTargets) == 0) return; CopyBeforeWrite(); LPCTSTR lpsz = m_pchData; while (*lpsz != '\0') { if (_tcschr(lpszTargets, *lpsz) == NULL) break; lpsz = _tcsinc(lpsz); } if (lpsz != m_pchData) { // fix up data and length int nDataLength = GetData()->nDataLength - (lpsz - m_pchData); memmove(m_pchData, lpsz, (nDataLength+1)*sizeof(TCHAR)); GetData()->nDataLength = nDataLength; }}