Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Alpha characters in a string
Message
From
12/11/2003 14:53:31
 
 
To
12/11/2003 14:46:48
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00849226
Message ID:
00849229
Views:
23
>What is the slickest way to figure out if alpha characters are in a string
>such as:
>
>x = "234e593"
>? DoesItContainAlpha(x) && Returns .T.
>
>y = "1345.00"
>? DoesIt ContainAlpha(y) && Returns .F.
>
>I can cycle through the whole alphabet and see if one of the
>characters are contained in the string, but that seems to
>long......
>
>Does anyone know a quicker way?
>Thanks,
>Dan

How about
x = "234e593"
? LEN(x) = LEN(CHRTRAN(UPPER(x), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',''))
If it returns .f. then the expression has a charater in it. This only hadles letters.
Charles

"The code knows no master." - Chuck Mautz
"Everybody is ignorant, only on different subjects." - Will Rogers
Previous
Reply
Map
View

Click here to load this message in the networking platform