{"action":"created","issue":{"url":"https://api.github.com/repos/Araq/Nim/issues/1857","labels_url":"https://api.github.com/repos/Araq/Nim/issues/1857/labels{/name}","comments_url":"https://api.github.com/repos/Araq/Nim/issues/1857/comments","events_url":"https://api.github.com/repos/Araq/Nim/issues/1857/events","html_url":"https://github.com/Araq/Nim/pull/1857","id":53323193,"number":1857,"title":"Add format string function using micro DSL.","user":{"login":"hiteshjasani","id":6628,"avatar_url":"https://avatars.githubusercontent.com/u/6628?v=3","gravatar_id":"","url":"https://api.github.com/users/hiteshjasani","html_url":"https://github.com/hiteshjasani","followers_url":"https://api.github.com/users/hiteshjasani/followers","following_url":"https://api.github.com/users/hiteshjasani/following{/other_user}","gists_url":"https://api.github.com/users/hiteshjasani/gists{/gist_id}","starred_url":"https://api.github.com/users/hiteshjasani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hiteshjasani/subscriptions","organizations_url":"https://api.github.com/users/hiteshjasani/orgs","repos_url":"https://api.github.com/users/hiteshjasani/repos","events_url":"https://api.github.com/users/hiteshjasani/events{/privacy}","received_events_url":"https://api.github.com/users/hiteshjasani/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Araq/Nim/labels/Stdlib","name":"Stdlib","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-04T03:00:44Z","updated_at":"2015-01-06T03:59:43Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Araq/Nim/pulls/1857","html_url":"https://github.com/Araq/Nim/pull/1857","diff_url":"https://github.com/Araq/Nim/pull/1857.diff","patch_url":"https://github.com/Araq/Nim/pull/1857.patch"},"body":"Added function to enable easy formatting of strings.\r\n* Left or right justify strings within a specified width\r\n* Use any padding character, defaults to space\r\n* Truncate string from left or right side if larger than specified width\r\n* micro DSL wrapper function provides a more terse interface\r\n\r\nFor example:\r\n\r\n```nim\r\nassert fmt(\"<5<\", \"abc\", '.') = \"abc..\"\r\nassert fmt(\">5<\", \"abc\", '.') = \"..abc\"\r\n```"},"comment":{"url":"https://api.github.com/repos/Araq/Nim/issues/comments/68823310","html_url":"https://github.com/Araq/Nim/pull/1857#issuecomment-68823310","issue_url":"https://api.github.com/repos/Araq/Nim/issues/1857","id":68823310,"user":{"login":"def-","id":2335377,"avatar_url":"https://avatars.githubusercontent.com/u/2335377?v=3","gravatar_id":"","url":"https://api.github.com/users/def-","html_url":"https://github.com/def-","followers_url":"https://api.github.com/users/def-/followers","following_url":"https://api.github.com/users/def-/following{/other_user}","gists_url":"https://api.github.com/users/def-/gists{/gist_id}","starred_url":"https://api.github.com/users/def-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/def-/subscriptions","organizations_url":"https://api.github.com/users/def-/orgs","repos_url":"https://api.github.com/users/def-/repos","events_url":"https://api.github.com/users/def-/events{/privacy}","received_events_url":"https://api.github.com/users/def-/received_events","type":"User","site_admin":false},"created_at":"2015-01-06T03:59:43Z","updated_at":"2015-01-06T03:59:43Z","body":"This looks similar to functionality in the strfmt module: http://lyro.bitbucket.org/strfmt/"}}