I don't know why, but I noticed why I ask the script some big tasks it fails on some.
For example I ran a 25 lines script on a 4000 line file, with only "replace" and "replacecase", and I have like 10 lines which are ignored by my script.
Any clue ?
I'll look into that.
The built-in StringReplace function in Delphi isn't very scalable; on large strings it runs very slowly. Since I wanted line breaks to be available in the search and replace strings, I couldn't just run the StringReplace on individual lines. So I wrote a function to break the file into manageable chunks and run it on them individually, then concatenate them together. That's the most likely place where the problem is occurring.
A few questions:
Are the ignored lines in the beginning, end, or middle of the file?
Do some of the replaces work and not others?
Could you copy and paste your script into this forum? Maybe there's something in them that I hadn't anticipated when coding it.
I'm not sure if it's random or not, I've been able to reproduce this on the same lines but not each time. It's in the middle of the file.
on this file:
Line 1904 and 4368, ignored on a first pass, taken in on the 2th. I'm aware that some line are ignored due to the return type (332 for instance), but in that case a second pass shouldn't fix it.
Good luck !