Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Find position 1st occurrence of nonnumeric value in a st
Message
 
 
À
10/01/2008 12:09:55
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:
01280906
Vues:
33
>Right you are. How about this one? <g>
>
>
function FirstPosAlpha
>lparameter tcString
>RETURN at( left( alltrim( chrtran( m.tcString, [1234567890], '' ) ), 1 ), m.tcString )
>
>And an even shorter (not quicker) one is:
>
>
function FirstPosAlpha
>lparameter tcString
>RETURN at( left( chrtran( m.tcString, [1234567890 ], '' ) ), 1 ), m.tcString )
>
>But this is essentially the same algorithm that Hugo proposed here: Re: Find position 1st Occurance of nonnumeric value in a str Thread #1280661 Message #1280664
>And Borislav here: Re: Find position 1st Occurance of nonnumeric value in a str Thread #1280661 Message #1280669

Right, I didn't read every message carefully first time. So, Hugo should get the solution points <g>
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform