Here is my code. name is a wstring that i must cut in pieses because of keys delimeters, characters * or ,
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
wstring name(L"πρ*ν,ζη*μἶν");
size_t i=wcslen(name.c_str());
wchar_t *s1=newwchar_t(i);
wcscpy(s1,name.c_str());// i am copying the wstring to s1
wchar_t * keys ( L"*,"); // delemeters of chars
wchar_t *s2=newwchar_t(i); // same size like s1
while(s2=s2=wcspbrk(s1,keys)){ // if a chars of keys there is ..
size_t i1=wcslen(s1);
size_t i2=wcslen(s2);
wchar_t *s3=newwchar_t(i1-i2);
wcsncpy(s3,s1,i1-i2); // ... make s3, that in first time must be πρ
delete []s3;
// between i whant the s2[1]= * as wstring
s1=s2[1]; // then i whant to take the rest *ν,ζη*μἶν, but it dont work
// how i must do that?
}