Advertisement
DraKiNs

[COD] RemoverLinha

Jun 26th, 2011
272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.43 KB | None | 0 0
  1. stock RemoverLinha(sArquivo[],sLinha[])
  2. {
  3.     new
  4.         sTmp[0500],     //define o tamanho da váriavel para armazenar o arquivo
  5.         sFinal[5000],
  6.         File:iFile = fopen(sArquivo, io_read);
  7.  
  8.     while(fread(iFile, sTmp))
  9.     {
  10.         if(strcmp(sTmp, sLinha, true))
  11.         {
  12.             strcat(sFinal,sTmp);
  13.         }
  14.     }
  15.     fclose(iFile);
  16.     fremove(sArquivo);
  17.  
  18.     new File:iFile = fopen(sArquivo, io_write);
  19.     fwrite(iFile,sFinal);
  20.     fclose(iFile);
  21.     return true;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement