当前位置: 首页>>代码示例>>C++>>正文


C++ CStringList::RemoveAt方法代码示例

本文整理汇总了C++中CStringList::RemoveAt方法的典型用法代码示例。如果您正苦于以下问题:C++ CStringList::RemoveAt方法的具体用法?C++ CStringList::RemoveAt怎么用?C++ CStringList::RemoveAt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CStringList的用法示例。


在下文中一共展示了CStringList::RemoveAt方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: WebUpdateOption

CString WebUpdateOption(CString strInput)
{
	CString strOutput, strItem, strTemp;
	CStringList strList;
	POSITION pos1, pos2;

	WebGetStringList(strInput, 7, strList);

	strOutput = _T("<OPTION");
#ifndef __GNUC__
	for (pos1 = strList.GetHeadPosition(); pos1 != NULL;)
#else
  for (pos1 = strList.begin(); pos1 != strList.end(); ++pos1)
#endif
	{
		pos2 = pos1;
		strItem = strList.GetNext(pos1);
		strTemp = strItem.Left(6);
		if (!strTemp.CompareNoCase(_T("value=")))
		{
			strItem = strItem.Right(strItem.GetLength()-6);
			strItem = RemoveQuote(strItem);
			strOutput += _T(" value=");
			strOutput += strItem;
			strList.RemoveAt(pos2);
		}
		else if (!strItem.CompareNoCase(_T("selected")))
		{
			strList.RemoveAt(pos2);
		}
	}
#ifndef __GNUC__
	for (pos1 = strList.GetHeadPosition(); pos1 != NULL;)
#else
  for (pos1 = strList.begin(); pos1 != strList.end(); ++pos1)
#endif
	{
		strOutput += _T(' ');
		strItem = strList.GetNext(pos1);
		strOutput += strItem;
	}
	strOutput += _T('>');
	return strOutput;
}
开发者ID:AlexVangelov,项目名称:ar168l,代码行数:44,代码来源:web.cpp

示例2: SubtractThisList

int CFuncList::SubtractThisList(CStringList& rList)
{
   POSITION rPos = rList.GetHeadPosition(); 
   while (rPos) {
      POSITION tPos = rPos;
      CString tName = rList.GetNext(rPos);
      POSITION fPos = GetHeadPosition();
      while (fPos) {
         if (tName == GetNext(fPos)) {
            rList.RemoveAt(tPos);
            break;
         }
      }
   }
   return (int)GetCount();
}
开发者ID:vinnie38170,项目名称:klImageCore,代码行数:16,代码来源:Func.cpp

示例3: Process

void vmsFilesToDelete::Process()
{
	CStringList sl;
	_App.FilesToDelete (sl);

	for (int i = sl.GetCount () - 1; i >= 0; i--)
	{
		LPCTSTR psz = sl.GetAt (sl.FindIndex (i));
		BOOL bOK = TRUE;
		if (GetFileAttributes (psz) != DWORD (-1))
			bOK = DeleteFile (psz);
		if (bOK)
			sl.RemoveAt (sl.FindIndex (i));
	}

	
	
	_App.FilesToDelete_save (sl);
}
开发者ID:naroya,项目名称:freedownload,代码行数:19,代码来源:vmsFilesToDelete.cpp

示例4: WebUpdateInput

CString WebUpdateInput(CString strInput)
{
	CString strOutput, strItem, strTemp;
	CStringList strList;
	POSITION pos1, pos2;
	int iType;

	WebGetStringList(strInput, 6, strList);

	strOutput = _T("<INPUT");
	iType = ITEM_TYPE_TEXT;
#ifndef __GNUC__
	for (pos1 = strList.GetHeadPosition(); pos1 != NULL;)
#else
  for (pos1 = strList.begin(); pos1 != strList.end(); ++pos1)
#endif
	{
		pos2 = pos1;
		strItem = strList.GetNext(pos1);
		strTemp = strItem.Left(5);
		if (!strTemp.CompareNoCase(_T("name=")))
		{
			strItem = strItem.Right(strItem.GetLength()-5);
			strItem = RemoveQuote(strItem);
			strOutput += _T(" name=");
			strOutput += strItem;
			strList.RemoveAt(pos2);
		}
		else if (!strTemp.CompareNoCase(_T("type=")))
		{
			strTemp = strItem.Right(strItem.GetLength()-5);
			strTemp = RemoveQuote(strTemp);
			if (!strTemp.CompareNoCase(_T("checkbox")))
			{
				iType = ITEM_TYPE_CHECKBOX;
			}
			else if (!strTemp.CompareNoCase(_T("text")))
			{
				iType = ITEM_TYPE_TEXT;
			}
			else if (!strTemp.CompareNoCase(_T("password")))
			{
				iType = ITEM_TYPE_PASSWORD;
			}
			else if (!strTemp.CompareNoCase(_T("radio")))
			{
				iType = ITEM_TYPE_RADIO;
			}
			else
			{
				iType = ITEM_TYPE_UNKNOWN;
			}
		}
		else if (!strItem.CompareNoCase(_T("checked")))
		{
			strList.RemoveAt(pos2);
		}
	}
#ifndef __GNUC__
	for (pos1 = strList.GetHeadPosition(); pos1 != NULL;)
#else
  for (pos1 = strList.begin(); pos1 != strList.end(); ++pos1)
#endif
	{
		pos2 = pos1;
		strItem = strList.GetNext(pos1);
		strTemp = strItem.Left(6);
		if (!strTemp.CompareNoCase(_T("value=")))
		{
			if (iType == ITEM_TYPE_CHECKBOX || iType == ITEM_TYPE_TEXT || iType == ITEM_TYPE_PASSWORD)
			{
				strList.RemoveAt(pos2);
			}
			else if (iType == ITEM_TYPE_RADIO)
			{
				strItem = strItem.Right(strItem.GetLength()-6);
				strItem = RemoveQuote(strItem);
				strOutput += _T(" value=");
				strOutput += strItem;
				strList.RemoveAt(pos2);
			}
		}
	}
#ifndef __GNUC__
	for (pos1 = strList.GetHeadPosition(); pos1 != NULL;)
#else
  for (pos1 = strList.begin(); pos1 != strList.end(); ++pos1)
#endif
	{
		strOutput += _T(' ');
		strItem = strList.GetNext(pos1);
		strOutput += strItem;
	}
	strOutput += _T('>');
	return strOutput;
}
开发者ID:AlexVangelov,项目名称:ar168l,代码行数:96,代码来源:web.cpp


注:本文中的CStringList::RemoveAt方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。