can you help me to optimize the procedure below?
Code: Select all
Procedure.s RemoveChar(String1.s, String2.s)
Protected nCiclo.b, nLen2.b, cResult.s
nLen2 = Len(String2)
cResult = String1
For nCiclo = 1 To nLen2
cResult = RemoveString(cResult, Mid(String2, nCiclo, 1))
Next
ProcedureReturn cResult
EndProcedure
; {test procedure}
a.s = "ABCDEFG"
b.s = "AF"
debug RemoveChar(a, b)

