Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Case insensitive strtran()
Message
De
26/04/2001 09:23:53
 
 
À
25/04/2001 14:12:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00499747
Message ID:
00500060
Vues:
28
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform