Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Find position 1st occurrence of nonnumeric value in a st
Message
 
 
To
09/01/2008 15:36:57
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:
01280680
Views:
27
Or you can add space to lcDigits and rename it to lcIgnoreChars. :)

>This seems to work the best (for most scenarios) if I alltrim(lcRest). Thanks Sergey!
>
>
>>>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...
>>
>>
>>lcDigits = "0123456789"
>>lcmyString = "123456789 Boldorn"
>>lcRest = CHRTRAN(lcmyString , lcDigits, "")
>>? AT("-", CHRTRAN(lcmyString, lcRest, REPLICATE("-", LEN(lcRest))))
>>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform