Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Quickly alltrim non-alpha chars from string
Message
De
01/08/2005 17:56:47
 
 
À
01/08/2005 16:43:05
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01037589
Message ID:
01037659
Vues:
26
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform