{ "id": "145455", "key": "TIMOB-18640", "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": null, "resolutiondate": null, "created": "2015-03-05T19:43:00.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [], "issuelinks": [], "assignee": null, "updated": "2018-02-28T19:54:49.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [], "description": "When using String.Format(), if you include a number any remaining characters will be removed from the final output.\r\n\r\nIn your Titanium App:\r\n\r\n{code}\r\nvar forename = 'Paul';\r\nvar number = 21;\r\nvar message = String.format('Welcome, %s! You are visitor number %d', forename, number);\r\nconsole.log(message);\r\n{code}\r\n\r\nNotice that this outputs as expected:\r\n\r\n{code}\r\n\r\nWelcome, Paul! You are visitor number 21\r\n\r\n{code}\r\n\r\nNow try the same code except this time add some additional text after you use the %d\r\n\r\n{code}\r\n\r\nvar forename = 'Paul';\r\nvar number = 21;\r\nvar message = String.format('Welcome, %s! You are visitor number %d isn't that great!?', forename, number);\r\nconsole.log(message);\r\n\r\n{code}\r\n\r\nThen take a look at the output - \r\n\r\n{code}\r\n\r\nWelcome, Paul! You are visitor number 21\r\n\r\n{code}\r\n\r\nNotice that the remaining text content is removed.", "attachment": [], "flagged": false, "summary": "String.Format truncates text after %d", "creator": { "name": "bgrantges@appcelerator.com", "key": "bgrantges", "displayName": "Bert Grantges", "active": false, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "bgrantges@appcelerator.com", "key": "bgrantges", "displayName": "Bert Grantges", "active": false, "timeZone": "America/Chicago" }, "environment": null, "comment": { "comments": [ { "id": "348895", "author": { "name": "itinance", "key": "itinance", "displayName": "Hagen", "active": true, "timeZone": "Europe/Berlin" }, "body": "Can someone give us any hints about an upcoming fix (or not)?", "updateAuthor": { "name": "itinance", "key": "itinance", "displayName": "Hagen", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-04-08T07:04:56.000+0000", "updated": "2015-04-08T07:04:56.000+0000" }, { "id": "348925", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~jonalter] is this related to the fix you did recently?", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-04-08T14:13:04.000+0000", "updated": "2015-04-08T14:13:04.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }