How to Kill Blanks in a CString,but how to kill Chinese Blanks i can not solve.
//get every word in name and then
//get every CHINESE's zimu.
//to be quickly must at one time get 3 CHINESE's
//zimu at one run.
//XXX or XX, or X X.
//first kill all blunk //this symbo is what?
name="是 嗯啊";//abc d";
char *buffer,*p;
//--blunk2:
CString blunk2;
blunk2=" ";
char *buffer2;
buffer2=blunk2.GetBuffer(2);
char b1=buffer2[0];
char b2=buffer2[1];
//end blunk2;
buffer=name.GetBuffer(name.GetLength());
p=buffer;
char newBuffer[20]="\0";
int i=0;
while(*p){///if((*p!=' ')&&(*p!=b1)&&(*p!=b2)){
//to be do which chinese blunk!.above error.
if((*p!=' ')){
newBuffer[i]=*p;
i++;
}
p++;
}//end while *p
newBuffer[i]='\0';
//now must reset the new str;
CString newString;
newString.Format("%s",newBuffer);
AfxMessageBox(name+" and after kill :"+newString);
return "";