Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TRIM leading zeros
Message
From
11/01/2011 15:41:50
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
TRIM leading zeros
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01495747
Message ID:
01495747
Views:
144
Please Note: VFP 8

Is there an expression which will trim leading zeros from a character expression? The expression may contain non-numeric characters.

What I've come up with seems so convoluted there almost has to be a better way.
xx="00010012012"
? SUBSTR(xx,AT(LEFT(CHRTRAN(xx,"0",""),1),xx))
Thanks to all.........Rich
Next
Reply
Map
View

Click here to load this message in the networking platform