Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Find position 1st occurrence of nonnumeric value in a st
Message
From
10/01/2008 15:22:48
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01280661
Message ID:
01280970
Views:
15
>>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>

Actually, even Tore's solution is essentially similar but although he was earlier with his initial reply, his updated solution was probably later than the others. <g> Re: Find position 1st Occurance of nonnumeric value in a str Thread #1280661 Message #1280663

Sure, Hugo deserves a point also. But rather Sergey got 2 points too much. <g>
Groet,
Peter de Valença

Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform