{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/corefx/issues/6485","repository_url":"https://api.github.com/repos/dotnet/corefx","labels_url":"https://api.github.com/repos/dotnet/corefx/issues/6485/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/6485/comments","events_url":"https://api.github.com/repos/dotnet/corefx/issues/6485/events","html_url":"https://github.com/dotnet/corefx/issues/6485","id":136873206,"number":6485,"title":"Add parameterless overloads of TrimStart/TrimEnd","user":{"login":"jamesqo","id":9159214,"avatar_url":"https://avatars.githubusercontent.com/u/9159214?v=3","gravatar_id":"","url":"https://api.github.com/users/jamesqo","html_url":"https://github.com/jamesqo","followers_url":"https://api.github.com/users/jamesqo/followers","following_url":"https://api.github.com/users/jamesqo/following{/other_user}","gists_url":"https://api.github.com/users/jamesqo/gists{/gist_id}","starred_url":"https://api.github.com/users/jamesqo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamesqo/subscriptions","organizations_url":"https://api.github.com/users/jamesqo/orgs","repos_url":"https://api.github.com/users/jamesqo/repos","events_url":"https://api.github.com/users/jamesqo/events{/privacy}","received_events_url":"https://api.github.com/users/jamesqo/received_events","type":"User","site_admin":false},"labels":[{"id":163655927,"url":"https://api.github.com/repos/dotnet/corefx/labels/api-approved","name":"api-approved","color":"159818","default":false},{"id":174276033,"url":"https://api.github.com/repos/dotnet/corefx/labels/area-System.Runtime","name":"area-System.Runtime","color":"d4c5f9","default":false},{"id":337781680,"url":"https://api.github.com/repos/dotnet/corefx/labels/netfx-port-consider","name":"netfx-port-consider","color":"5319e7","default":false},{"id":145399958,"url":"https://api.github.com/repos/dotnet/corefx/labels/up%20for%20grabs","name":"up for grabs","color":"159818","default":false}],"state":"open","locked":false,"assignee":{"login":"fujiy","id":1336227,"avatar_url":"https://avatars.githubusercontent.com/u/1336227?v=3","gravatar_id":"","url":"https://api.github.com/users/fujiy","html_url":"https://github.com/fujiy","followers_url":"https://api.github.com/users/fujiy/followers","following_url":"https://api.github.com/users/fujiy/following{/other_user}","gists_url":"https://api.github.com/users/fujiy/gists{/gist_id}","starred_url":"https://api.github.com/users/fujiy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fujiy/subscriptions","organizations_url":"https://api.github.com/users/fujiy/orgs","repos_url":"https://api.github.com/users/fujiy/repos","events_url":"https://api.github.com/users/fujiy/events{/privacy}","received_events_url":"https://api.github.com/users/fujiy/received_events","type":"User","site_admin":false},"assignees":[{"login":"fujiy","id":1336227,"avatar_url":"https://avatars.githubusercontent.com/u/1336227?v=3","gravatar_id":"","url":"https://api.github.com/users/fujiy","html_url":"https://github.com/fujiy","followers_url":"https://api.github.com/users/fujiy/followers","following_url":"https://api.github.com/users/fujiy/following{/other_user}","gists_url":"https://api.github.com/users/fujiy/gists{/gist_id}","starred_url":"https://api.github.com/users/fujiy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fujiy/subscriptions","organizations_url":"https://api.github.com/users/fujiy/orgs","repos_url":"https://api.github.com/users/fujiy/repos","events_url":"https://api.github.com/users/fujiy/events{/privacy}","received_events_url":"https://api.github.com/users/fujiy/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/dotnet/corefx/milestones/5","html_url":"https://github.com/dotnet/corefx/milestone/5","labels_url":"https://api.github.com/repos/dotnet/corefx/milestones/5/labels","id":1328080,"number":5,"title":"Future","description":"Milestone tracking the issues triaged for an unspecified future release","creator":{"login":"joshfree","id":1302850,"avatar_url":"https://avatars.githubusercontent.com/u/1302850?v=3","gravatar_id":"","url":"https://api.github.com/users/joshfree","html_url":"https://github.com/joshfree","followers_url":"https://api.github.com/users/joshfree/followers","following_url":"https://api.github.com/users/joshfree/following{/other_user}","gists_url":"https://api.github.com/users/joshfree/gists{/gist_id}","starred_url":"https://api.github.com/users/joshfree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshfree/subscriptions","organizations_url":"https://api.github.com/users/joshfree/orgs","repos_url":"https://api.github.com/users/joshfree/repos","events_url":"https://api.github.com/users/joshfree/events{/privacy}","received_events_url":"https://api.github.com/users/joshfree/received_events","type":"User","site_admin":false},"open_issues":723,"closed_issues":6,"state":"open","created_at":"2015-09-29T00:25:45Z","updated_at":"2016-12-22T23:16:02Z","due_on":null,"closed_at":null},"comments":16,"created_at":"2016-02-27T03:28:08Z","updated_at":"2016-12-26T22:56:00Z","closed_at":null,"body":"I propose we add parameterless overloads of `TrimStart`/`TrimEnd` for the String class.\n# Rationale\n- We have a parameterless `Trim` [method](https://msdn.microsoft.com/en-us/library/t97s7bs3%28v=vs.110%29.aspx), so it's best to do this for symmetry.\n- <s>We can avoid array allocations every time the method is called, e.g. `TrimStart()` would no longer transparently allocate an array. We can avoid this with `TrimStart(Array.Empty<char>())`, but that's besides the point.</s>\n- With the [current implmementation](https://github.com/dotnet/coreclr/blob/master/src/mscorlib/src/System/String.cs#L1366) in CoreCLR, it would be relatively trivial to implement. Just add this to the class:\n\n``` csharp\npublic string TrimStart() => TrimHelper(TrimHead);\npublic string TrimEnd() => TrimHelper(TrimTail);\n```\n- Perhaps this is just me, but when I first came across the `TrimStart(params char[])` overload (as a beginner to C#), I wasn't even aware that you could leave a `params` method empty. I just assumed that the functionality I was looking for wasn't available, and ended up making my own helper method.\n# Proposed API\n\n``` csharp\nnamespace System\n{\n    public class String\n    {\n        // New methods\n        public string TrimStart();\n        public string TrimEnd();\n    }\n}\n```\n"},"comment":{"url":"https://api.github.com/repos/dotnet/corefx/issues/comments/269247292","html_url":"https://github.com/dotnet/corefx/issues/6485#issuecomment-269247292","issue_url":"https://api.github.com/repos/dotnet/corefx/issues/6485","id":269247292,"user":{"login":"karelz","id":5776068,"avatar_url":"https://avatars.githubusercontent.com/u/5776068?v=3","gravatar_id":"","url":"https://api.github.com/users/karelz","html_url":"https://github.com/karelz","followers_url":"https://api.github.com/users/karelz/followers","following_url":"https://api.github.com/users/karelz/following{/other_user}","gists_url":"https://api.github.com/users/karelz/gists{/gist_id}","starred_url":"https://api.github.com/users/karelz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karelz/subscriptions","organizations_url":"https://api.github.com/users/karelz/orgs","repos_url":"https://api.github.com/users/karelz/repos","events_url":"https://api.github.com/users/karelz/events{/privacy}","received_events_url":"https://api.github.com/users/karelz/received_events","type":"User","site_admin":false},"created_at":"2016-12-26T22:56:00Z","updated_at":"2016-12-26T22:56:00Z","body":"Invite sent ..."}}
{"actor":{"display_login":"karelz"}}