Instruction: copy/paste to your program as you see fit. Delimiter is user/ program defined. Note that int piece cannot be null; piece 0 and 1 are the same, first piece of the delimited string. Call the function by: var=piece(string,delimiter,piece number) /*Piece Function for wxWidgets; *Author : Jim Bell *Date : 09/23/08 *Detail : Returns the indicated substring in a delimited string variable */ wxString piece(wxString data, wxChar *delim, int piece) { string str=""; if (piece==1||(!piece)) {str=data.BeforeFirst(*delim);return(str);} //known quantity if (data[strlen(data)]!=*delim) {data=data+*delim;} int i,ndelims=0,delpos[]={}; unsigned int ii; for (ii=0;iindelims) {return("");} int pos1=delpos[piece-1],pos2=delpos[piece]; for (i=pos1+1;i