question about CStringT::Tokenize



Hi,

I try to split a string "First,,Third" with ",". I suppose the result is
"First", "", and "Third". But why it is "First","Third".(A empty string has
been skipped.)

BTW, how about ",First,Second,Third" and "First,Second,Third,"

If CString::Tokenize cannot support it directly, any other way can do it
easily.

//code
CString str( "First,,Third" );
CString resToken;
int curPos= 0;

CString strSplitter( "," );
resToken= str.Tokenize(strSplitter,curPos);
while (resToken != "")
{
printf("Resulting token: %s\n", resToken);
resToken= str.Tokenize(strSplitter,curPos);
};


Best Regards,
ZHANG LIREN
.