>Borislav,
>
>Or, the strfilter() function hidden in FoxTools.fll
>
>set library to foxtools.fll additive
>lcPhone = strfilter( lcPhone, "0123456789" )
>
>The strfilter() function filters out all chars except those listed in the 2nd parm.
>
>What I like about this function is that its easy to understand what its doing when I see it my source code.
>
>Malcolm
Hi Malcolm...
It's obviously not as readable as the strfilter() function, but the following does the same thing:
chrtran(lcPhone,chrtran(lcPhone,"0123456789",""),"")
The inner chrtran() gets rid of all the numeric characters, leaving everything else. Then that result is used to get rid of all of THOSE characters in the outer chrtran().
Obviously not very readable or intuitive at all, but it eliminates the need for FoxTools. You could just put that in a procedure library:
function mystrfilter
lparameters tcString,tcCharsToFilter
return chrtran(tcString,chrtran(tcString,tcCharsToFilter,""),"")
--Brad