Advertisement
garfield

[COD]: Trocar caracteres

Apr 30th, 2013
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.28 KB | None | 0 0
  1. main(){
  2.  
  3.     SwapChars("Hey God - Tell me what the hell is going on", ' ', '_');
  4.  
  5. }
  6.  
  7.  
  8.  
  9. stock SwapChars(str[], chr, chr2){
  10.     static
  11.         l,
  12.         p
  13.     ;
  14.    
  15.     for(l = strlen(str), p = 0; l != p; ++p){
  16.         if(str[p] == chr){
  17.             str[p] = chr2;
  18.         }
  19.     }
  20.     return str;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement