Titanium JIRA Archive
Appcelerator Community (AC)

[AC-250] String.format does not work correctly

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionNeeds more info
Resolution Date2015-08-12T07:17:48.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAlloy, Titanium SDK & CLI
Labelsios, iphone
ReporterSascha Brose
AssigneeRadamantis Torres-Lechuga
Created2015-07-22T20:28:45.000+0000
Updated2015-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.

Comments

  1. Amimul Hossain 2015-07-25

    Hello [~saschbro], Please provide a test case of the problem, So we can test and regenerate. Thanks.

JSON Source