garfield

[COD]: Remover espaços de uma string.

Jan 19th, 2012
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.32 KB | None | 0 0
  1. /*
  2.     @Nome: Removeer Espaços
  3.     @Créditos: [iPs]SuYaNw
  4. */
  5.  
  6.  
  7.  
  8. static stock RemoverEspacos(str[])
  9. {
  10.     new out[128];
  11.     for(new i; i != strlen(str); ++i)
  12.     {
  13.         if(str[i] == ' ') out[i] = str[i+1],strdel(str, i, i+1);
  14.         out[i] = str[i];
  15.     }
  16.     return out;
  17. }
  18.  
  19.  
  20.  
  21. //Uso:
  22. printf("%s", RemoverEspacos("Sou Muito Lindo"));
Advertisement
Add Comment
Please, Sign In to add comment