Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Quickly alltrim non-alpha chars from string
Message
From
01/08/2005 17:56:47
 
 
To
01/08/2005 16:43:05
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01037589
Message ID:
01037659
Views:
25
Hi Malcolm

>Thanks again for the new code, but it doesn't work either. I think I'm going to stay with my current approach unless someone stumbles across a Win32 API call that does something similar.
>

Sorry, I made a mistake when I cut & paste. It should be this:
cAlpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
nStartPos = at( left( chrtran( pcStr, chrtran( pcStr, cAlpha, '' ), '' ), 1 ), pcStr )
nEndPos = rat( right( chrtran( pcStr, chrtran( pcStr, cAlpha, '' ), '' ), 1 ), pcStr )
?substr( pcStr, nStartPos, nEndPos - nStartPos + 1 )
Hope it works now
Regards
Herman
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform