Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void trimming(char vers[10000])
- {
- char *token = vers;
- char *aux = malloc(10000*sizeof(char));
- while(*token != '0') { // are un caracter pe el
- if(isspace(*token) && isspace(*(token +1))) { // verif daca e whitespace sau
- strcpy(aux, token); // copiaza varianta corecta peste
- strcpy(aux, token + 1);
- strcpy(token, aux);
- }
- ++token;
- }
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement