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:
00454418
Vues:
35
>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",""), ""))

Nice !
censored.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform