{"action":"created","issue":{"url":"https://api.github.com/repos/sq/JSIL/issues/653","labels_url":"https://api.github.com/repos/sq/JSIL/issues/653/labels{/name}","comments_url":"https://api.github.com/repos/sq/JSIL/issues/653/comments","events_url":"https://api.github.com/repos/sq/JSIL/issues/653/events","html_url":"https://github.com/sq/JSIL/issues/653","id":55432330,"number":653,"title":"Missing String.TrimStart and String.TrimEnd","user":{"login":"TriEdgeAI","id":664488,"avatar_url":"https://avatars.githubusercontent.com/u/664488?v=3","gravatar_id":"","url":"https://api.github.com/users/TriEdgeAI","html_url":"https://github.com/TriEdgeAI","followers_url":"https://api.github.com/users/TriEdgeAI/followers","following_url":"https://api.github.com/users/TriEdgeAI/following{/other_user}","gists_url":"https://api.github.com/users/TriEdgeAI/gists{/gist_id}","starred_url":"https://api.github.com/users/TriEdgeAI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TriEdgeAI/subscriptions","organizations_url":"https://api.github.com/users/TriEdgeAI/orgs","repos_url":"https://api.github.com/users/TriEdgeAI/repos","events_url":"https://api.github.com/users/TriEdgeAI/events{/privacy}","received_events_url":"https://api.github.com/users/TriEdgeAI/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sq/JSIL/labels/Missing%20Feature","name":"Missing Feature","color":"02d7e1"},{"url":"https://api.github.com/repos/sq/JSIL/labels/Unmerged%20Contribution","name":"Unmerged Contribution","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-01-25T22:04:30Z","updated_at":"2015-02-12T16:04:10Z","closed_at":null,"body":"Quick fixes:\r\n\r\nStringProxy.cs:\r\n\r\n        [JSReplacement(\"JSIL.TrimStart($this, $trimChars)\")]\r\n        [JSIsPure]\r\n        public string TrimStart (params char[] trimChars) {\r\n            throw new InvalidOperationException();\r\n        }\r\n\r\n        [JSReplacement(\"JSIL.TrimEnd($this, $trimChars)\")]\r\n        [JSIsPure]\r\n        public string TrimEnd (params char[] trimChars) {\r\n            throw new InvalidOperationException();\r\n        }\r\n\r\nJSIL.Bootstrap.Text.js:\r\n\r\n\tJSIL.TrimStart = function(str, trimChars) {\r\n\t  // TODO: Exceptions\r\n\t  \r\n\t  for(var i = 0; i < str.length; i++) {\r\n\t\tif(trimChars.indexOf(str[i]) == -1) {\r\n\t\t  break;\r\n\t\t}\r\n\t  }\r\n\t  \r\n\t  return str.substr(i);\r\n\t}\r\n\r\n\tJSIL.TrimEnd = function(str, trimChars) {\r\n\t  // TODO: Exceptions\r\n\t  \r\n\t  for(var i = str.length - 1; i >= 0; i--) {\r\n\t\tif(trimChars.indexOf(str[i]) == -1) {\r\n\t\t  break;\r\n\t\t}\r\n\t  }\r\n\t  \r\n\t  return str.substr(0, i);\r\n\t}\r\n"},"comment":{"url":"https://api.github.com/repos/sq/JSIL/issues/comments/74096607","html_url":"https://github.com/sq/JSIL/issues/653#issuecomment-74096607","issue_url":"https://api.github.com/repos/sq/JSIL/issues/653","id":74096607,"user":{"login":"TriEdgeAI","id":664488,"avatar_url":"https://avatars.githubusercontent.com/u/664488?v=3","gravatar_id":"","url":"https://api.github.com/users/TriEdgeAI","html_url":"https://github.com/TriEdgeAI","followers_url":"https://api.github.com/users/TriEdgeAI/followers","following_url":"https://api.github.com/users/TriEdgeAI/following{/other_user}","gists_url":"https://api.github.com/users/TriEdgeAI/gists{/gist_id}","starred_url":"https://api.github.com/users/TriEdgeAI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TriEdgeAI/subscriptions","organizations_url":"https://api.github.com/users/TriEdgeAI/orgs","repos_url":"https://api.github.com/users/TriEdgeAI/repos","events_url":"https://api.github.com/users/TriEdgeAI/events{/privacy}","received_events_url":"https://api.github.com/users/TriEdgeAI/received_events","type":"User","site_admin":false},"created_at":"2015-02-12T16:04:10Z","updated_at":"2015-02-12T16:04:10Z","body":"There are only two hard problems in Computer Science: cache invalidation, naming things, and off-by-one errors. :)"}}