Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
To clean a string
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00454334
Message ID:
00454417
Vues:
34

Why not apply the UPPER to the results of the CHRTRAN()'s which should (consequently) be shorter, and also faster (being a one-liner):
lcClean = upper( chrtran(lcOrig, chrtran(lcOrig, "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",""), ""))
After adding the lower case alphabet to the list.

Houston,

If you still want one-line, you can use:
lcClean=chrtran(lcOrig, chrtran(upper(lcOrig), "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",""), ""))
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform