Advertisement
dllbridge

Untitled

Jun 27th, 2020
985
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.37 KB | None | 0 0
  1.  
  2. ////////////////////////////////////////////////////
  3. int PackText(char *sz_1, char  *sz_2)             //
  4. {
  5.    
  6.     int n = 0,
  7.         i = 0,
  8.      flag = 0;
  9.    
  10.     while(sz_2[n]) {
  11.        if(sz_2[n] == ' ')
  12.        {   
  13.               if( flag) {      n++;  continue; }
  14.               sz_1[i++] = sz_2[n++]; flag = 1;     
  15.        }else{ sz_1[i++] = sz_2[n++]; flag = 0; }
  16.     }
  17.    
  18.     sz_1[i] = 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement