Case-Insensitive StrReplace

Started by jtrask, September 03, 2014, 01:37:36 PM

Previous topic - Next topic

jtrask

Is there a (relatively) simple way to do a case-insensitive StrReplace?

JTaylor


jtrask

Thanks.  That worked.

I'd avoided creating a buffer because I've only done it once before, and that was years ago.  Once I jumped in, it proved much easier to do what I had been doing previously by reading a file line by line.

td

Just make sure that when your replacement string is longer than your search string, you allocate a buffer big enough to handle the maximum number of possible replacements plus the number of extra characters.   Of course, if your replacement string is never longer that your search string, never mind...
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade