亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? tstring.cpp

?? TFixedAlloc類是一個非常不錯的使用與Linux和windows跨平臺的內存分配工具
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
	while (*lpsz != '\0')
	{
		if (*lpsz == chTarget)
		{
			if (lpszLast == NULL)
				lpszLast = lpsz;
		}
		else
			lpszLast = NULL;
		lpsz = _tcsinc(lpsz);
	}

	if (lpszLast != NULL)
	{
		// truncate at left-most matching character
		*lpszLast = '\0';
		GetData()->nDataLength = lpszLast - m_pchData;
	}
	*/
}

// remove continuous occcurrences of characters in passed string,
// starting from right
void TString::TrimRight(TLPCTSTR lpszTargetList)
{
	// find beginning of trailing matches
	// by starting at beginning (DBCS aware)
return;
/*	CopyBeforeWrite();
	LPTSTR lpsz = m_pchData;
	LPTSTR lpszLast = NULL;

	while (*lpsz != '\0')
	{
		if (_tcschr(lpszTargetList, *lpsz) != NULL)
		{
			if (lpszLast == NULL)
				lpszLast = lpsz;
		}
		else
			lpszLast = NULL;
		lpsz = _tcsinc(lpsz);
	}

	if (lpszLast != NULL)
	{
		// truncate at left-most matching character
		*lpszLast = '\0';
		GetData()->nDataLength = lpszLast - m_pchData;
	}
	*/
}	

// remove continuous occurrences of chTarget starting from left
void TString::TrimLeft(char chTarget)
{
	// find first non-matching character
return;
/*	CopyBeforeWrite();
	LPCTSTR lpsz = m_pchData;

	while (chTarget == *lpsz)
		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;
	}
	*/
}

// remove continuous occcurrences of characters in
// passed string, starting from left
void TString::TrimLeft(TLPCTSTR lpszTargets)
{
	// if we're not trimming anything, we're not doing any work
	return;
/*	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;
	}
	*/
}

// advanced manipulation=========================================

// replace occurrences of chOld with chNew
int TString::Replace(char chOld, char chNew)
{
	int nCount = 0;

	// short-circuit the nop case
/*	if (chOld != chNew)
	{
		// otherwise modify each character that matches in the string
		CopyBeforeWrite();
		LPTSTR psz = m_pchData;
		LPTSTR pszEnd = psz + GetData()->nDataLength;
		while (psz < pszEnd)
		{
			// replace instances of the specified character only
			if (*psz == chOld)
			{
				*psz = chNew;
				nCount++;
			}
			psz = _tcsinc(psz);
		}
	}*/
	return nCount;
}

// replace occurrences of substring lpszOld with lpszNew;
// empty lpszNew removes instances of lpszOld
int TString::Replace(TLPCTSTR lpszOld, TLPCTSTR lpszNew)
{
	// can't have empty or NULL lpszOld
return 0;
/*	int nSourceLen = SafeStrlen(lpszOld);
	if (nSourceLen == 0)
		return 0;
	int nReplacementLen = SafeStrlen(lpszNew);

	// loop once to figure out the size of the result string
	int nCount = 0;
	LPTSTR lpszStart = m_pchData;
	LPTSTR lpszEnd = m_pchData + GetData()->nDataLength;
	LPTSTR lpszTarget;
	while (lpszStart < lpszEnd)
	{
		while ((lpszTarget = _tcsstr(lpszStart, lpszOld)) != NULL)
		{
			nCount++;
			lpszStart = lpszTarget + nSourceLen;
		}
		lpszStart += lstrlen(lpszStart) + 1;
	}

	// if any changes were made, make them
	if (nCount > 0)
	{
		CopyBeforeWrite();

		// if the buffer is too small, just
		//   allocate a new buffer (slow but sure)
		int nOldLength = GetData()->nDataLength;
		int nNewLength =  nOldLength + (nReplacementLen-nSourceLen)*nCount;
		if (GetData()->nAllocLength < nNewLength || GetData()->nRefs > 1)
		{
			CStringData* pOldData = GetData();
			LPTSTR pstr = m_pchData;
			AllocBuffer(nNewLength);
			memcpy(m_pchData, pstr, pOldData->nDataLength*sizeof(TCHAR));
			CString::Release(pOldData);
		}
		// else, we just do it in-place
		lpszStart = m_pchData;
		lpszEnd = m_pchData + GetData()->nDataLength;

		// loop again to actually do the work
		while (lpszStart < lpszEnd)
		{
			while ( (lpszTarget = _tcsstr(lpszStart, lpszOld)) != NULL)
			{
				int nBalance = nOldLength - (lpszTarget - m_pchData + nSourceLen);
				memmove(lpszTarget + nReplacementLen, lpszTarget + nSourceLen,
					nBalance * sizeof(TCHAR));
				memcpy(lpszTarget, lpszNew, nReplacementLen*sizeof(TCHAR));
				lpszStart = lpszTarget + nReplacementLen;
				lpszStart[nBalance] = '\0';
				nOldLength += (nReplacementLen - nSourceLen);
			}
			lpszStart += lstrlen(lpszStart) + 1;
		}
		ASSERT(m_pchData[nNewLength] == '\0');
		GetData()->nDataLength = nNewLength;
	}

	return nCount;*/
}

// remove occurrences of chRemove
int TString::Remove(char chRemove)
{
return 0;
	/*CopyBeforeWrite();

	LPTSTR pstrSource = m_pchData;
	LPTSTR pstrDest = m_pchData;
	LPTSTR pstrEnd = m_pchData + GetData()->nDataLength;

	while (pstrSource < pstrEnd)
	{
		if (*pstrSource != chRemove)
		{
			*pstrDest = *pstrSource;
			pstrDest = _tcsinc(pstrDest);
		}
		pstrSource = _tcsinc(pstrSource);
	}
	*pstrDest = '\0';
	int nCount = pstrSource - pstrDest;
	GetData()->nDataLength -= nCount;

	return nCount;*/
}

// insert character at zero-based index; concatenates
// if index is past end of string
int TString::Insert(int nIndex, char ch)
{
	CopyBeforeWrite();

	if (nIndex < 0)
		nIndex = 0;

	int nNewLength = GetData()->nDataLength;
	if (nIndex > nNewLength)
		nIndex = nNewLength;
	nNewLength++;

	if (GetData()->nAllocLength < nNewLength)
	{
		TStringData* pOldData = GetData();
		TLPTSTR pstr = m_pchData;
		AllocBuffer(nNewLength);
		memcpy(m_pchData, pstr, (pOldData->nDataLength+1)*sizeof(char));
		TString::Release(pOldData);
	}

	// move existing bytes down
	memcpy(m_pchData + nIndex + 1,
		m_pchData + nIndex, (nNewLength-nIndex)*sizeof(char));
	m_pchData[nIndex] = ch;
	GetData()->nDataLength = nNewLength;

	return nNewLength;
}	

// insert substring at zero-based index; concatenates
// if index is past end of string
int TString::Insert(int nIndex, TLPCTSTR pstr)
{
	if (nIndex < 0)
		nIndex = 0;

	int nInsertLength = SafeStrlen(pstr);
	int nNewLength = GetData()->nDataLength;
	if (nInsertLength > 0)
	{
		CopyBeforeWrite();
		if (nIndex > nNewLength)
			nIndex = nNewLength;
		nNewLength += nInsertLength;

		if (GetData()->nAllocLength < nNewLength)
		{
			TStringData* pOldData = GetData();
			TLPTSTR pstr = m_pchData;
			AllocBuffer(nNewLength);
			memcpy(m_pchData, pstr, (pOldData->nDataLength+1)*sizeof(char));
			TString::Release(pOldData);
		}

		// move existing bytes down
		memcpy(m_pchData + nIndex + nInsertLength,
			m_pchData + nIndex,
			(nNewLength-nIndex-nInsertLength+1)*sizeof(char));
		memcpy(m_pchData + nIndex,
			pstr, nInsertLength*sizeof(char));
		GetData()->nDataLength = nNewLength;
	}

	return nNewLength;
}

// delete nCount characters starting at zero-based index
int TString::Delete(int nIndex, int nCount /* = 1 */)
{
	if (nIndex < 0)
		nIndex = 0;
	int nNewLength = GetData()->nDataLength;
	if (nCount > 0 && nIndex < nNewLength)
	{
		CopyBeforeWrite();
		int nBytesToCopy = nNewLength - (nIndex + nCount) + 1;

		memcpy(m_pchData + nIndex,
			m_pchData + nIndex + nCount, nBytesToCopy * sizeof(char));
		GetData()->nDataLength = nNewLength - nCount;
	}

	return nNewLength;
}

///////////////////////////////////////////////////////////////////////////////
// Commonly used routines (rarely used routines in STREX.CPP)

// searching==================================================================

// find character starting at left, -1 if not found

int TString::Find(char ch) const
{
	return Find(ch, 0);
}

// find character starting at zero-based index and going right
int TString::Find(char ch, int nStart) const
{
	return 0;
/*	int nLength = GetData()->nDataLength;
	if (nStart >= nLength)
		return -1;

	// find first single character
	TLPTSTR lpsz = _tcschr(m_pchData + nStart, (_TUCHAR)ch);

	// return -1 if not found and index otherwise
	return (lpsz == NULL) ? -1 : (int)(lpsz - m_pchData);
	*/
}

// find character starting at right
int TString::ReverseFind(char ch) const
{
return 0;
	// find last single character
/*	TLPTSTR lpsz = _tcsrchr(m_pchData, (_TUCHAR) ch);

	// return -1 if not found, distance from beginning otherwise
	return (lpsz == NULL) ? -1 : (int)(lpsz - m_pchData);
	*/
}

int TString::FindOneOf(TLPCTSTR lpszCharSet) const
{
	//ASSERT(AfxIsValidString(lpszCharSet));
	return 0;
	/*
	TLPTSTR lpsz = _tcspbrk(m_pchData, lpszCharSet);
	return (lpsz == NULL) ? -1 : (int)(lpsz - m_pchData);
	*/
}

// find first instance of substring
// find a sub-string (like strstr)
int TString::Find(TLPCTSTR lpszSub) const
{
	return Find(lpszSub, 0);
}

int TString::Find(TLPCTSTR lpszSub, int nStart) const
{
	//ASSERT(AfxIsValidString(lpszSub));
return 0;
/*	int nLength = GetData()->nDataLength;
	if (nStart > nLength)
		return -1;

	// find first matching substring
	LPTSTR lpsz = _tcsstr(m_pchData + nStart, lpszSub);

	// return -1 for not found, distance from beginning otherwise
	return (lpsz == NULL) ? -1 : (int)(lpsz - m_pchData);
	*/
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品粉嫩超白一线天av| 香蕉成人伊视频在线观看| 亚洲人成小说网站色在线 | 91久久免费观看| 久久久三级国产网站| 五月天激情综合| 91在线视频官网| 欧美极品美女视频| 蜜臀av性久久久久蜜臀aⅴ流畅| 91麻豆自制传媒国产之光| 久久久久国产精品麻豆ai换脸| 亚洲成人在线免费| 91美女视频网站| 中文字幕亚洲欧美在线不卡| 黑人精品欧美一区二区蜜桃| 日韩一级免费观看| 午夜精品爽啪视频| 欧美一a一片一级一片| 自拍偷拍亚洲欧美日韩| 成人福利电影精品一区二区在线观看| 日韩欧美一级片| 免费视频一区二区| 欧美一区二区三区思思人| 亚洲sss视频在线视频| 在线免费观看一区| 亚洲一区二区三区四区在线| 不卡一二三区首页| 亚洲女与黑人做爰| 欧美在线不卡一区| 一区二区视频在线| 欧美优质美女网站| 丝袜美腿亚洲一区| 日韩午夜激情电影| 久久不见久久见免费视频7| 精品国产一区二区三区忘忧草| 蜜桃一区二区三区在线| 欧美一卡二卡三卡四卡| 韩国av一区二区三区四区| 久久久久久久久99精品| 成人一区二区三区中文字幕| 国产精品久久影院| 一本色道久久综合亚洲91| 亚洲一区二区在线播放相泽| 欧美日韩一区二区欧美激情| 美女在线观看视频一区二区| www国产精品av| 9l国产精品久久久久麻豆| 夜夜嗨av一区二区三区| 91精品国产综合久久久久久久久久| 蜜臀av国产精品久久久久| 国产欧美一区二区在线观看| 色综合中文综合网| 欧美精品一区二区三区四区| 国产精品1区二区.| 一区二区在线观看免费视频播放| 欧美久久久久免费| 大胆亚洲人体视频| 亚洲一区二区美女| 精品粉嫩超白一线天av| 91蝌蚪porny九色| 久久精工是国产品牌吗| 国产精品理论片| 欧美久久久久久久久中文字幕| 精品无人区卡一卡二卡三乱码免费卡| 国产欧美va欧美不卡在线| 欧美色网站导航| 国产成人8x视频一区二区| 亚洲综合丁香婷婷六月香| www欧美成人18+| 欧美三级在线视频| 丰满岳乱妇一区二区三区| 首页国产欧美久久| 亚洲欧洲日产国产综合网| 欧美一区二区视频在线观看2022| 床上的激情91.| 日精品一区二区| 亚洲色图视频网| 久久久久青草大香线综合精品| 欧美日韩午夜在线| 成人av电影在线网| 韩国欧美一区二区| 热久久免费视频| 亚洲久本草在线中文字幕| 久久久精品中文字幕麻豆发布| 欧美美女一区二区在线观看| 91香蕉视频mp4| 懂色av一区二区三区免费观看| 婷婷久久综合九色综合绿巨人| 亚洲视频在线观看一区| 日本一区二区三区免费乱视频| 欧美美女喷水视频| 欧美日韩小视频| 欧美三区在线观看| 一本高清dvd不卡在线观看| 成人国产视频在线观看| 国产一区二区不卡老阿姨| 久久国产乱子精品免费女| 午夜在线成人av| 亚洲自拍偷拍av| 亚洲综合久久久| 一区二区三区在线免费视频| 国产精品国产三级国产普通话三级| 久久久久久影视| 久久久久国产精品麻豆ai换脸 | 日本视频一区二区三区| 亚洲丶国产丶欧美一区二区三区| 亚洲精品欧美在线| 亚洲免费电影在线| 一区二区三区精品在线观看| 一区二区三区美女视频| 亚洲国产日韩a在线播放性色| 一级精品视频在线观看宜春院| 亚洲视频一区在线观看| 亚洲裸体xxx| 一区二区在线观看不卡| 一区av在线播放| 日韩va欧美va亚洲va久久| 日本系列欧美系列| 免费日本视频一区| 国产精品自拍在线| 国产精品亚洲午夜一区二区三区| 国产精品资源站在线| 大胆亚洲人体视频| 一本色道久久综合狠狠躁的推荐| 色老汉一区二区三区| 欧美精品一级二级三级| 欧美大肚乱孕交hd孕妇| 久久亚洲精品国产精品紫薇| 国产午夜亚洲精品午夜鲁丝片| 国产精品传媒在线| 亚洲va天堂va国产va久| 精品制服美女久久| 99久久777色| 在线不卡免费欧美| 国产午夜精品在线观看| 亚洲女厕所小便bbb| 蜜臀av性久久久久蜜臀av麻豆| 国产精品自在欧美一区| 一本高清dvd不卡在线观看| 91麻豆精品国产91久久久久久久久 | 日韩不卡在线观看日韩不卡视频| 蜜臀av亚洲一区中文字幕| 成人深夜视频在线观看| 欧美性一二三区| 欧美午夜精品免费| 国产成人一区在线| 色综合久久天天综合网| 51精品国自产在线| 欧美激情中文字幕一区二区| 亚洲日本韩国一区| 美女在线一区二区| 94-欧美-setu| 2020日本不卡一区二区视频| 中文字幕亚洲电影| 激情图片小说一区| 欧美日韩精品专区| 国产精品美日韩| 蜜臀av一区二区| 欧美色综合网站| 国产精品欧美一区喷水| 青青草国产精品97视觉盛宴| 成人教育av在线| 亚洲精品一区二区在线观看| 亚洲综合自拍偷拍| 成人激情免费视频| 精品久久久久久久久久久久包黑料 | 成人网在线免费视频| 制服丝袜成人动漫| 一区二区三区四区国产精品| 国产一区二区三区四区在线观看| 欧美日高清视频| 日韩毛片视频在线看| 国产成人av福利| 欧美tickle裸体挠脚心vk| 亚洲成人福利片| 91麻豆国产福利精品| 国产蜜臀av在线一区二区三区| 久久精品国产亚洲一区二区三区| 色8久久人人97超碰香蕉987| 国产精品嫩草久久久久| 国产一区二区免费看| 欧美电影免费观看高清完整版| 午夜激情综合网| 欧美亚洲综合在线| 亚洲国产精品综合小说图片区| heyzo一本久久综合| 中文在线一区二区| 国产成人在线网站| 欧美大片在线观看一区二区| 蜜桃视频第一区免费观看| 欧美裸体一区二区三区| 亚洲国产一区二区视频| 91九色最新地址| 亚洲一级片在线观看| 欧美三级日韩三级| 亚洲午夜精品在线| 91精品在线一区二区| 日本亚洲三级在线| 欧美刺激午夜性久久久久久久| 久久www免费人成看片高清|