Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Case insensitive strtran()
Message
De
26/04/2001 14:10:10
 
 
À
26/04/2001 13:58:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00499747
Message ID:
00500279
Vues:
44
>>>
>>>Has anyone written a case insensitive STRTRAN() replacement.
>>>

This simple approach ignores the starting position and number of occurances but it gets the job done for most instances.
function mystrtran
lparameters lcTarget, lcSearchFor, lcReplaceWith

*-- lower case search param
tcLower = lower(lcSearchFor)
*-- upper case search param
tcUpper = upper(lcSearchFor)

tcResult1 = strtran(lcTarget, tcLower, tcReplaceWith)
tcFinalResult = strtran(lcResult1, tcUpper, tcReplaceWith)

return lcFinalResult
-Henry-
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform