Just give the separator. Later, I used VC for similar string analysis. VC didn't provide such a function and I couldn't find it after I searched the internet. So I wrote a function myself. Although the function is relatively simple, but some friends may need it, which is just convenient!
Ii. FunctionsCode:
// Parameter description:
Source: The Source string to be split;
DeST: stores the target variables of each string variable after segmentation;
Division: delimiter
Void decodecstring (cstring source, cstringarray & DEST, char Division) {DeST. removeall (); For (INT I = 0; I <source. getlength (); I ++) {If (source. getat (I) = Division) {DeST. add (source. left (I); // remove the right for (Int J = 0; j <(DEST. getsize ()-1); j ++) {Dest [DeST. getsize ()-1] = Dest [DeST. getsize ()-1]. right (Dest [DeST. getsize ()-1]. getlength ()-Dest [J]. getlength ()-1); // remove the left }}}}
Hope to help beginners!