Format code to trim leading zeroes? [message #81243] |
Mon, 27 August 2012 22:10  |
A J
Messages: 11 Registered: February 2012
|
Junior Member |
|
|
I am not sure this can be done easily, but I was looking for some way
to format numbers in order to return the number without leading zeroes
or the decimal. For example,
if I have
0.003508
I want to return
3508
I have been playing with the format codes and strsplit but nothing has
worked quite right. I am thinking I could write a little program to
feed the number into a string array and run a few steps on the array
such that once the array value no longer equals '0' or '.', it stops
and returns whatever is left. However, before I go down this road, I
thought it might be wise to ask if this is the best/only way to do it.
Thanks.
|
|
|
|