[AC-250] String.format does not work correctly
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | n/a |
| Status | Closed |
| Resolution | Needs more info |
| Resolution Date | 2015-08-12T07:17:48.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | Alloy, Titanium SDK & CLI |
| Labels | ios, iphone |
| Reporter | Sascha Brose |
| Assignee | Radamantis Torres-Lechuga |
| Created | 2015-07-22T20:28:45.000+0000 |
| Updated | 2015-08-12T07:17:48.000+0000 |
Description
I am using String.format to add leading zeros to a given number:
String.format('M_%1$03d', 60);
This should lead to the string 'M_060' but instead I am getting random strings like 'M_295886848' (number is changing after each restart of the simulator). A similar format string already worked in another project that I built with Titanium SDK 3.5.0.
Hello [~saschbro], Please provide a test case of the problem, So we can test and regenerate. Thanks.