Login  Register

Re: String.format

Posted by Wayne Rasband-2 on Nov 18, 2020; 5:24pm
URL: http://imagej.273.s1.nabble.com/String-format-tp5024199p5024206.html

> On Nov 18, 2020, at 11:49 AM, Peter Haub <[hidden email]> wrote:
>
> Here is a use case
> https://forum.image.sc/t/fiji-macro-issue-no-window-with-title-found/45525/3

The easy way to add leading zeros to an integer is to use the IJ.pad(n,digits) function. It is not obvious how to do it using String.format().

-wayne

> On 18.11.2020 17:04, Kenneth Sloan wrote:
>> I suspect that all numbers are doubles in macros.
>> --
>> Kenneth Sloan
>> [hidden email]
>> Vision is the art of seeing what is invisible to others.
>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html