lcPattern=left(tcDBFName,lnPos+1)+'???'+substr(tcDBFName,lnPos+4)>>it was something different. Therefore the program just didn't do anything...
lcPattern=left(tcDBFName,lnPos+1)+'???'+substr(tcDBFName,lnPos+4)>you could use
lcPattern=Stuff(tcDBFName,lnPos+2, 2, '???')>A single function should be faster than two functions plus two string concatenateions. Besides, I always thought that all the string chopping functions (left, right, substr()) are internally done as Stuff() with special parameters.
local lcPatern, lnSec, lnPos, tcDBFName, i tcDBFName=replicate("bkl",30) lnPos=20 lnSec=seconds() for i=1 to 100000 lcPattern=left(tcDBFName,lnPos+1)+'???'+substr(tcDBFName,lnPos+4) endfor ?seconds()-lnSec lnSec=seconds() for i=1 to 100000 lcPattern=Stuff(tcDBFName,lnPos+2, 2, '???') endfor ?seconds()-lnSecBTW, I can not use chrtran for chrtran(lcString,["],"") because of the bug in chrtran. David Frankenbah mentioned it, see the problem in WiKi.