The cstring: tokenize () and afxextractsubstring () functions are used to intercept strings with specific delimiters. Some differences are worth noting.
Cstringt tokenize (pcxstr psztokens, Int & istart) const;
Bool afxapi afxextractsubstring (cstring & rstring, lpctstr lpszfullstring, int isubstring, tchar chsep = '\ n ');
Cstring: pcxstr psztokens in tokenize () is a combination of separated characters and can contain multiple characters. Int & istart is the starting position and changes after the function is run.
The tchar chsep in afxextractsubstring () is a delimiter and can only be one character.
Note the following:
Cstring: tokenize () is treated as one separator when multiple consecutive separator characters exist. multiple separators in afxextractsubstring () can be processed separately.
Http://blog.csdn.net/habit2/archive/2007/08/14/1742007.aspx