Seperate the string to some new strings with the seperator.
int str_separate( LPCSTR lpcszStr, LPCSTR lcpszSep, vector<string> & vsSections )
Return the size of the output string vector.
EX1
void str_separate_ex1() { vector<string> vsSections; string strOriginal = "The United States\r\nChina\r\nJapan\r\nOrigin is Good"; string strSep = "\r\n"; int iSecNum = str_separate(strOriginal,strSep, vsSections); if(iSecNum) { printf("after separated:\n"); for(int ii=0; ii<vsSections.GetSize(); ii++) printf("%s\n",vsSections[ii]); } else printf("Separate failed\n"); }
str_combine
origin.h