Results 1 to 35 of 35

Thread: Find a string in a text file Fast....

Threaded View

  1. #1

    Thread Starter
    Frenzied Member Jmacp's Avatar
    Join Date
    Jul 2003
    Location
    UK
    Posts
    1,959

    Find a string in a text file Fast....

    This demonstrates a faster way to search any file and pull a full line from that file given a search string, than the string buffer way. Uses an API method to open a file and store it in a buffer then instr'gs though the buffer to find a match, also compares this to the ordinary string buffer method, API wins by a factor of about 3.5 for a 1 meg text file which is not bad.

    Could also open the file as binary and use instr, didn't bother with it though..
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width