반응형

Tokenize 예제

CString value = ...();	//여기서 ;를 포함하는 긴 String을 받아오는 곳이라고 치자.

//Split & Push
CString str;
int curpos = 0;

while ((str = value.Tokenize(_T(";"),curpos)) != _T(""))
{
	GroupItem* item = new GroupItem;
	
	LocalId id = CW2A(str);
	item->put_localId(id);

	item->put_name((std::wstring)str);

	item->put_url((std::wstring)(_T("\\") + str));

	items.push_back(item);
}

return items;	
		
반응형
Posted by Rainfly
l