08-26-2013 09:11 PM
Hi,
I am using the divide function and I've found that if the remainder starts with a zero the leading zero is dropped. In my script I want to check if the output of $remainder is 6 characters and if not to add a leading zero, any idea of the best way to do this? I was thinking a regex?
Ryan
08-27-2013 08:11 AM
You can use the string length action for this.
string length $remainder
if $_string_result lt 6
set remainder "0$remainder"
end
08-27-2013 06:11 PM
Great answer, I didn't know you could do that.
What version of EEM is required for the string length command?
08-27-2013 06:51 PM
EEM 3.0.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide