>>Your code will miss some occurences that happens to be split between two sequential reads.
What if you create a DO WHILE loop to catch split values- something like
lcFirstChar=left(m.lcStringToReplace,1)
lnLen=len(m.lcStringToReplace)-1
...
lcString=fread(1,8092)
lcCheck=right(m.lcstring,m.lnLen)
do while m.lcFirstChar $ m.lcCheck and ! feof(1)
lcCheck=substr(m.lcCheck,AT(m.lcFirstchar,m.lcCheck))
if m.lcCheck == left(m.lcStringToReplace,len(m.lcCheck))
lcstring=m.lcstring+FREAD(1,100)
lcCheck=right(m.lcstring,m.lnLen)
else
lcCheck=substr(m.lcCheck,2)
endif
enddo
"... They ne'er cared for us
yet: suffer us to famish, and their store-houses
crammed with grain; make edicts for usury, to
support usurers; repeal daily any wholesome act
established against the rich, and provide more
piercing statutes daily, to chain up and restrain
the poor. If the wars eat us not up, they will; and
there's all the love they bear us."
-- Shakespeare: Coriolanus, Act 1, scene 1