Sunday, June 14, 2015

Fast StringReplace fix

I did a small and silly mistake in my original FastStringReplace implementation that could cause the FastStringReplace() routine to fail completely when rfIgnoreCase was used and the OldPattern was already in upper case.
The bug is fixed and I'm also writing a unit test for it. If you are already using FastStringReplace in your code, please update using latest version.

Direct download link here.

4 comments:

Vincent Parrett said...

Might want to update the download link in the original post so people don't download a broken version. Even better, put the code on github so people can see when it changes.

Anonymous said...

Dear Vincent
do you have version of your FastPOs/FastPosEx that works solely with AnsiStrings as both the substring and the main String. The reason I ask is that I want to do a string search in a file of 1.5G single character/single byte and if I use your version with Unicode I get an out of memory error. I know it works with Delphi Pos but as you know it is notoriously slow.

Thanks

Regards

Zac

Vincent Parrett said...

No, sorry, I only use unicode these days.

Anonymous said...

Please, can you update the download link? It is dead :(

By the way, I am also from Brazil (a city near São Paulo) and have friends from Belo Horizonte...

Thank you! Sucess!