how use wxSscanf for string include the white spaces
Posted: Fri Jan 27, 2012 12:56 am
Hello,
I was wondering if there was a way to include the white spaces in a string.
wxString xxx = wxT("1 test word");
wxChar *naa = NULL;
int num = 0;
if( na ) delete [] naa;
naa = new wxChar[10];
wxSscanf(xxx, wxT("%d %[^\0]s"),&num, naa);
//i tested also this: %[^ ]s and %[ a-zA-Z0-9+*/_]
wxString yyy(naa);
wxMessageBox(naa);
I need have in naa = "test word"";
However, this doesn't include the 'space' character or any other white
spaces. Is there a way I can include the 'space' character rather than skip
in.
Thanks in advance.
BR, VSfai
I was wondering if there was a way to include the white spaces in a string.
wxString xxx = wxT("1 test word");
wxChar *naa = NULL;
int num = 0;
if( na ) delete [] naa;
naa = new wxChar[10];
wxSscanf(xxx, wxT("%d %[^\0]s"),&num, naa);
//i tested also this: %[^ ]s and %[ a-zA-Z0-9+*/_]
wxString yyy(naa);
wxMessageBox(naa);
I need have in naa = "test word"";
However, this doesn't include the 'space' character or any other white
spaces. Is there a way I can include the 'space' character rather than skip
in.
Thanks in advance.
BR, VSfai