Is there any way I can remove leading zeros in string variables?
Examples: 010, 00000001, 00000100 should become 10, 1, 100.
This variable needs to stay a string, I can't convert them to int() or I risk rounding errors on longer numbers. I know how to use mid() to compare the first digit and how to use while to loop. I also know how to use Replace(), but I don't know how to control that Replace() to only the 1st digit. I suspect a few of the app users may copy/paste so monitoring input may cause problems. I mostly just need an expression, action or the basic logic behind it so I can remove the leading zeros all together or one at a time and I can just loop.
====edit====
After some thought I suppose I could compare each digit consecutively using mid() and a loopindex(). If the selected digit ever gets above int(0) then move the rest of the digits to a new string. I feel there may be a better way though.
====edit2====
I understand user input would have to be in something that isn't a variable. I would assume the process would be the same though. Right now I only have this working in debug, I am keeping it modular so I can copy/paste it for later uses.
====edit3====
Solution is in this C3P. This C3P has some examples of a few specific things that not many people will need. Be sure to Disable all groups expect for the one with Regex() in the Group name.
dropbox.com/s/1v415k8h85jp2wa/Tutorials.c3p