Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Case insensitive strtran()
Message
From
26/04/2001 09:23:53
 
 
To
25/04/2001 14:12:07
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00499747
Message ID:
00500060
Views:
25
>Hi All,
>
>Has anyone written a case insensitive STRTRAN() replacement.
>
>NO, I can't just use VFP 7!
>
>BOb

Here's my version of the same function (As usual there are 30 ways to do the same thing!)
This way's nice and simple (but I don't know which is faster)
lParameters tcStr, tcFind, tcRep
Local lnPos

lnPos = ATC(tcFind, tcStr)
Do While lnPos > 0
tcStr = Stuff( tcStr, lnPos, Len(tcFind), "*!*WillsReplace*!*")
lnPos = ATC(tcFind, tcStr)
EndDo

Return StrTran(tcStr, "*!*WillsReplace*!*, tcRep)
HTH
Will Jones
Previous
Reply
Map
View

Click here to load this message in the networking platform