> is there a Strtran function (or similar) which will
> replace text but in a case insensitive manner, e,g,
>
> Abc=Strtran(MyFruit,'Apples','Coca Cola')
> Abc=Strtran(MyFruit,'apples','Coca Cola')......
I have a function I use that parses through occurrances in a string using OCCURS() and AT() and then uses STUFF() to insert the replacement string into the primary string at the appropriate location. If you look for the target string in the string searched while both are converted to uppercase, you will get case-independant results. After all, AT() returns the location in the string and a location is a number and a number is independant of case!
Here's my code:
DO WHILE OCCURS("strtran(", LOWER(_CLIPTEXT))>0
_CLIPTEXT=STUFF( _CLIPTEXT, AT("strtran(", LOWER(_CLIPTEXT) ), ;
LEN( "strtran(" ), "STRT(" )
ENDDO
...Art
http://members.aol.com/ARTGR/