wchar_t m_VStrBuf[2048]; m_vNumChar=GetPrivateProfileString(_T("List1"),NULL,NULL,m_VStrBuf,2048,m_VFileName);
wchar_t *ts; ts = m_VFileName; while (wcslen(ts) != 0) { //process string ts ts += wcslen(ts) + sizeof(wchar_t); // skip to next string in result buffer }
char * pch; pch = strtok (m_VStrBuf,","); // Here , is seprator. while (pch != NULL) { pch = strtok (NULL, ","); }
void tokenise_wstr(const wchar_t * str, size_t len, std::vector<std::wstring>& strings) { size_t prev = 0; size_t next = wcslen(str); while ( (prev < next ) && (next < len)) { strings.push_back( std::wstring(str + prev, str + next + 1)); prev = next + 1; next = prev + wcslen(str + prev); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)