Advertisement
Guest User

Untitled

a guest
Dec 6th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. void trimming(char vers[10000])
  2. {
  3. char *token = vers;
  4. char *aux = malloc(10000*sizeof(char));
  5.  
  6. while(*token != '0') { // are un caracter pe el
  7. if(isspace(*token) && isspace(*(token +1))) { // verif daca e whitespace sau
  8. strcpy(aux, token); // copiaza varianta corecta peste
  9. strcpy(aux, token + 1);
  10. strcpy(token, aux);
  11. }
  12. ++token;
  13. }
  14.  
  15. return;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement