Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- char* whitespace(char* s)
- {
- int brojac = 0;
- char *pomocni = s, *pok1; /*pomocni pokazivac na pocetak stringa*/
- while(*pomocni != '\0')
- {
- if(*pomocni == '\n' || *pomocni == '\t' || *pomocni == ' ')
- {
- *pomocni++ = ' ';
- pok1 = pomocni;
- while(*pok1 == '\n' || *pok1 == '\t' || *pok1 == ' ')
- pok1++;
- while(*pok1 != '\0')
- {
- *pomocni++ = *pok1++;
- }
- *pomocni = *pok1;
- pomocni = s;
- continue;
- }
- pomocni++;
- }
- return s;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement