>>>>or
>>>>
>>>>lcString="ABC,DEF,GHI,JKL"
>>>>lcString2 = lcString
>>>>FOR i = Occurs(',',lcString2) TO 1 STEP -1
>>>> lcString2 = STUFF(lcString2,At(',',lcString2,i),1,'')
>>>>endfor
>>>>?lcString2
>>>>
>>>
>>>"Yes, but can you make it an one-liner?" :)
>>
>>There was a trick ...
>>
>>?removechar("ABC,DEF,GHI,JKL",',')
>>
>>function removechar
>>lpara lcString2, lcChar
>>FOR i = Occurs(lcChar,lcString2) TO 1 STEP -1
>> lcString2 = STUFF(lcString2,At(lcChar,lcString2,i),1,'')
>>endfor
>>return lcString2
>>endfunc
>>
>
>I can cheat too... steal the code from myself (which I stole from someone else long ago):
>
>?chrtran("ABC,DEF,GHI,JKL", chrtran("ABC,DEF,GHI,JKL", ",", ""), "")
>
>See message #
01669287>
>Okay, it does the opposite... should be
>
>?chrtran("ABC,DEF,GHI,JKL", chrtran("ABC,DEF,GHI,JKL", "ABCDEFGHIJKL", ""), "")
Cheat!EinsElf! Change while I reply!Teh idea was
?chrtran("ABC,DEF,GHI,JKL", chrtran("ABC,DEF,GHI,JKL", chrtran("ABC,DEF,GHI,JKL", ",", ""), ""), "")
I guess
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord
Weeks of programming can save you hours of planning.
OffThere is no place like [::1]