Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Find position 1st occurrence of nonnumeric value in a st
Message
De
09/01/2008 15:19:09
 
 
À
09/01/2008 15:12:41
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01280661
Message ID:
01280663
Vues:
20
This message has been marked as a message which has helped to the initial question of the thread.
>lcmyString = "123456789 Boldorn"
>
>I want to return position 11 because it is the first non numeric position (B). just can't think of it today...

Something like
lcBadChars='0123456789'
lcFirstGoodChar=left(Chrtran(lcMystring, Chrtran(lcMystring,lcBadChars,""), ""),1)
lnFirstPos=at(lcFirstGoodChar,lcMystring)
Update! I was too quick, should have tested first. :-) I try again
lcBadChars='0123456789'
lcFirstGoodChar=Left(Chrtran(lcmyString,lcBadChars,''),1)
lnFirstPos=at(lcFirstGoodChar,lcMystring)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform