i need to write a function which transforms 2 or more spaces into one
for example:
"gjkk jjj k" (for some reason it doesnt show my edit) it should be with much more spaces between
turns to
"gjkk jjj k"
i have this structure
i need to substitute code instead of ??1?? for this function to workCode:void *(char *str) { int i; for(i=0;str[i];i++) if(str[i]=='i') if (??1??||??2??||??3??) { strcpy(??4??); ??5??; } }
i dont know why they use 3 or statements on this if??
i would do it by if the current cell is ' ' ans the next to then ..
and str copy makes of one string as the copy of abother
how to use it??