{ "id": "63745", "key": "TIMOB-3113", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "8", "description": "", "name": "Needs more info" }, "resolutiondate": "2017-06-14T17:26:44.000+0000", "created": "2011-04-15T03:37:17.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "core" ], "versions": [ { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-06-14T17:26:45.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "{html}

String.format does not return a proper string for this code:

\r\n

var result = String.format('%05d', 2);

\r\n

The result should be '00002' but instead it returns '00000'.\r\nBuild version is 1.5.1.

\r\n

Another developer encountered an error using String.format in\r\nbuild 1.5.2. See \r\nhttp://developer.appcelerator.com/question/111041/trying-to-use-str...

\r\n

Thanks!
\r\nJaime

{html}", "attachment": [], "flagged": false, "summary": "iOS: String.format does not return correct result for given value", "creator": { "name": "jaimefuhr", "key": "jaimefuhr", "displayName": "Jaime Fuhr", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jaimefuhr", "key": "jaimefuhr", "displayName": "Jaime Fuhr", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "209979", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Confirmed SDK 2.2.0.014b86f\r\n\r\nTest code:\r\n{code}\r\nTi.API.info(String.format('%05d', 2));\r\n{code}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-26T16:46:50.000+0000", "updated": "2012-07-26T16:46:50.000+0000" }, { "id": "421965", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket because the URL provided is no longer working so there's no way to find the test case.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-06-14T17:26:44.000+0000", "updated": "2017-06-14T17:26:44.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }