>Bigstring = 'cattttccv' >NonDupeString = NonDupe(BigString) > >* Result = 'catv' >>
FUNCTION NonDupe4(cString) LOCAL cNewStr, nT, aX[255,2] cNewStr = "" FOR nT = 1 TO 255 aX[nT,1] = AT(CHR(nT), cString) aX[nT,2] = CHR(nT) ENDFOR =ASORT(aX,1) && order on the found position, to preserve the order FOR nT = 1 TO 255 cNewStr = cNewStr + IIF(aX[nT,1] > 0, ax[nT,2], "") ENDFOR RETURN cNewStrFor John... yes, as you can see I "refactored" Marcia's solution because I'm using the same names.