{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/corefx/issues/27526","repository_url":"https://api.github.com/repos/dotnet/corefx","labels_url":"https://api.github.com/repos/dotnet/corefx/issues/27526/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/27526/comments","events_url":"https://api.github.com/repos/dotnet/corefx/issues/27526/events","html_url":"https://github.com/dotnet/corefx/issues/27526","id":300814974,"node_id":"MDU6SXNzdWUzMDA4MTQ5NzQ=","number":27526,"title":"[API] Add MemoryExtensions.Contains","user":{"login":"GrabYourPitchforks","id":1746272,"node_id":"MDQ6VXNlcjE3NDYyNzI=","avatar_url":"https://avatars0.githubusercontent.com/u/1746272?v=4","gravatar_id":"","url":"https://api.github.com/users/GrabYourPitchforks","html_url":"https://github.com/GrabYourPitchforks","followers_url":"https://api.github.com/users/GrabYourPitchforks/followers","following_url":"https://api.github.com/users/GrabYourPitchforks/following{/other_user}","gists_url":"https://api.github.com/users/GrabYourPitchforks/gists{/gist_id}","starred_url":"https://api.github.com/users/GrabYourPitchforks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GrabYourPitchforks/subscriptions","organizations_url":"https://api.github.com/users/GrabYourPitchforks/orgs","repos_url":"https://api.github.com/users/GrabYourPitchforks/repos","events_url":"https://api.github.com/users/GrabYourPitchforks/events{/privacy}","received_events_url":"https://api.github.com/users/GrabYourPitchforks/received_events","type":"User","site_admin":false},"labels":[{"id":163655927,"node_id":"MDU6TGFiZWwxNjM2NTU5Mjc=","url":"https://api.github.com/repos/dotnet/corefx/labels/api-approved","name":"api-approved","color":"159818","default":false},{"id":547241922,"node_id":"MDU6TGFiZWw1NDcyNDE5MjI=","url":"https://api.github.com/repos/dotnet/corefx/labels/area-System.Memory","name":"area-System.Memory","color":"d4c5f9","default":false},{"id":145399958,"node_id":"MDU6TGFiZWwxNDUzOTk5NTg=","url":"https://api.github.com/repos/dotnet/corefx/labels/up-for-grabs","name":"up-for-grabs","color":"159818","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"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,"node_id":"MDk6TWlsZXN0b25lMTMyODA4MA==","number":5,"title":"Future","description":"Milestone tracking issues not triaged to a planned release. Work in this milestone may happen, or may not: it is not committed.","creator":{"login":"joshfree","id":1302850,"node_id":"MDQ6VXNlcjEzMDI4NTA=","avatar_url":"https://avatars1.githubusercontent.com/u/1302850?v=4","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":1884,"closed_issues":188,"state":"open","created_at":"2015-09-29T00:25:45Z","updated_at":"2018-09-06T18:21:12Z","due_on":null,"closed_at":null},"comments":16,"created_at":"2018-02-27T22:18:31Z","updated_at":"2018-09-07T16:50:34Z","closed_at":null,"author_association":"MEMBER","body":"Proposal:\r\n\r\n```cs\r\npublic static class MemoryExtensions {\r\n    bool Contains<T>(this Span<T> span, T value);\r\n    bool Contains<T>(this ReadOnlySpan<T> span, T value);\r\n    bool Contains<T>(this Span<T> span, T value, IEqualityComparer<T> comparer);\r\n    bool Contains<T>(this ReadOnlySpan<T> span, T value, IEqualityComparer<T> comparer);\r\n}\r\n```\r\n\r\nThis is different from the `IndexOf` method in that we can perform certain optimizations if we know you don't need the exact index of where the value was found. There are a few places in the framework that would benefit from this.\r\n\r\nhttps://github.com/dotnet/corefx/blob/f0a032e4a1c8a848574a5db3e69e8a6fa0aae91e/src/System.Net.Primitives/src/System/Net/IPAddressParser.cs#L19\r\n\r\nhttps://github.com/dotnet/coreclr/blob/8ec9bdfd53220b555f0b19eebd6a2c4ab5dab8bf/src/mscorlib/shared/System/Guid.cs#L430\r\n\r\nhttps://github.com/dotnet/corefxlab/blob/c3624ba2c5f4fc4926ef64e5e35f2f6e895df6eb/src/System.Buffers.Experimental/System/Buffers/BufferExtensions.cs#L101\r\n\r\nhttps://github.com/dotnet/coreclr/blob/22f1bc00d018a49f9550ee3b564f5f7737960b0d/src/mscorlib/shared/System/Version.cs#L342"},"comment":{"url":"https://api.github.com/repos/dotnet/corefx/issues/comments/419500259","html_url":"https://github.com/dotnet/corefx/issues/27526#issuecomment-419500259","issue_url":"https://api.github.com/repos/dotnet/corefx/issues/27526","id":419500259,"node_id":"MDEyOklzc3VlQ29tbWVudDQxOTUwMDI1OQ==","user":{"login":"jkotas","id":6668460,"node_id":"MDQ6VXNlcjY2Njg0NjA=","avatar_url":"https://avatars2.githubusercontent.com/u/6668460?v=4","gravatar_id":"","url":"https://api.github.com/users/jkotas","html_url":"https://github.com/jkotas","followers_url":"https://api.github.com/users/jkotas/followers","following_url":"https://api.github.com/users/jkotas/following{/other_user}","gists_url":"https://api.github.com/users/jkotas/gists{/gist_id}","starred_url":"https://api.github.com/users/jkotas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkotas/subscriptions","organizations_url":"https://api.github.com/users/jkotas/orgs","repos_url":"https://api.github.com/users/jkotas/repos","events_url":"https://api.github.com/users/jkotas/events{/privacy}","received_events_url":"https://api.github.com/users/jkotas/received_events","type":"User","site_admin":false},"created_at":"2018-09-07T16:50:34Z","updated_at":"2018-09-07T16:50:34Z","author_association":"MEMBER","body":"Right, the implementation should be in CoreCLR. The reference assemblies and tests should be in CoreFX. More details on how this works is in https://github.com/dotnet/coreclr/blob/master/Documentation/project-docs/adding_new_public_apis.md"}}
{"actor":{"display_login":"jkotas"}}