Restored from previous forum. Originally posted by wayne1.
;Replace text procedure
;source = string to search
;find = string to find
;replace = text to replace find
initrequester()
s$="Testing Testing"
Procedure.s Replace(source.s,find.s,replace.s)
start.w=1
replaceLen=len(replace)
While start0
start=FindString(source,find,start);
If start > 0
source = left(source,start-1) + replace + mid(source,start + len(find),len(source))
start = start + replaceLen
EndIf
Wend
ProcedureReturn source
EndProcedure
a$=Replace(s$,"ing","ed")
messagerequester("",a$,0)