Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
To clean a string
Message
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00454334
Message ID:
00454418
Views:
32
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform