Advertisement
FoxHound

fremoveline

Sep 7th, 2011
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.39 KB | None | 0 0
  1. stock fremoveline(filedir[],lindex[])   //bY FoxHound
  2. {
  3.     if(!fexist(filedir)) { return 0; }
  4.     new rdline[196],str[1024],File:tmpfile = fopen(filedir,io_read);
  5.     while(fread(tmpfile,rdline)) {
  6.         if(strfind(rdline,lindex)>-1) { continue; }
  7.         strins(str,rdline,strlen(str)); }
  8.     fclose(tmpfile),fremove(filedir);
  9.     tmpfile=fopen(filedir,io_write);
  10.     return fwrite(tmpfile,str),fclose(tmpfile),1;
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement