{"action":"opened","number":1576,"pull_request":{"url":"https://api.github.com/repos/apple/swift-corelibs-foundation/pulls/1576","id":192257620,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkyMjU3NjIw","html_url":"https://github.com/apple/swift-corelibs-foundation/pull/1576","diff_url":"https://github.com/apple/swift-corelibs-foundation/pull/1576.diff","patch_url":"https://github.com/apple/swift-corelibs-foundation/pull/1576.patch","issue_url":"https://api.github.com/repos/apple/swift-corelibs-foundation/issues/1576","number":1576,"state":"open","locked":false,"title":"Make Range-from-NSRange generic over StringProtocol","user":{"login":"karwa","id":5254025,"node_id":"MDQ6VXNlcjUyNTQwMjU=","avatar_url":"https://avatars2.githubusercontent.com/u/5254025?v=4","gravatar_id":"","url":"https://api.github.com/users/karwa","html_url":"https://github.com/karwa","followers_url":"https://api.github.com/users/karwa/followers","following_url":"https://api.github.com/users/karwa/following{/other_user}","gists_url":"https://api.github.com/users/karwa/gists{/gist_id}","starred_url":"https://api.github.com/users/karwa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karwa/subscriptions","organizations_url":"https://api.github.com/users/karwa/orgs","repos_url":"https://api.github.com/users/karwa/repos","events_url":"https://api.github.com/users/karwa/events{/privacy}","received_events_url":"https://api.github.com/users/karwa/received_events","type":"User","site_admin":false},"body":"This means you can take an NSRange and resolve it relative to a Substring.\r\n\r\nThis can come up sometimes when working with Substrings on the Swift level and working with Objective-C APIs which return NSRange (e.g. NSRegularExpression). You need to copy to a String when performing matching, but the matched ranges can be resolved relative to the original String.","created_at":"2018-06-03T17:15:58Z","updated_at":"2018-06-03T17:15:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/apple/swift-corelibs-foundation/pulls/1576/commits","review_comments_url":"https://api.github.com/repos/apple/swift-corelibs-foundation/pulls/1576/comments","review_comment_url":"https://api.github.com/repos/apple/swift-corelibs-foundation/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apple/swift-corelibs-foundation/issues/1576/comments","statuses_url":"https://api.github.com/repos/apple/swift-corelibs-foundation/statuses/da819fa37f86cd79ff5d931eb47cad6ecfe059c4","head":{"label":"karwa:patch-1","ref":"patch-1","sha":"da819fa37f86cd79ff5d931eb47cad6ecfe059c4","user":{"login":"karwa","id":5254025,"node_id":"MDQ6VXNlcjUyNTQwMjU=","avatar_url":"https://avatars2.githubusercontent.com/u/5254025?v=4","gravatar_id":"","url":"https://api.github.com/users/karwa","html_url":"https://github.com/karwa","followers_url":"https://api.github.com/users/karwa/followers","following_url":"https://api.github.com/users/karwa/following{/other_user}","gists_url":"https://api.github.com/users/karwa/gists{/gist_id}","starred_url":"https://api.github.com/users/karwa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karwa/subscriptions","organizations_url":"https://api.github.com/users/karwa/orgs","repos_url":"https://api.github.com/users/karwa/repos","events_url":"https://api.github.com/users/karwa/events{/privacy}","received_events_url":"https://api.github.com/users/karwa/received_events","type":"User","site_admin":false},"repo":{"id":59202763,"node_id":"MDEwOlJlcG9zaXRvcnk1OTIwMjc2Mw==","name":"swift-corelibs-foundation","full_name":"karwa/swift-corelibs-foundation","owner":{"login":"karwa","id":5254025,"node_id":"MDQ6VXNlcjUyNTQwMjU=","avatar_url":"https://avatars2.githubusercontent.com/u/5254025?v=4","gravatar_id":"","url":"https://api.github.com/users/karwa","html_url":"https://github.com/karwa","followers_url":"https://api.github.com/users/karwa/followers","following_url":"https://api.github.com/users/karwa/following{/other_user}","gists_url":"https://api.github.com/users/karwa/gists{/gist_id}","starred_url":"https://api.github.com/users/karwa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karwa/subscriptions","organizations_url":"https://api.github.com/users/karwa/orgs","repos_url":"https://api.github.com/users/karwa/repos","events_url":"https://api.github.com/users/karwa/events{/privacy}","received_events_url":"https://api.github.com/users/karwa/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/karwa/swift-corelibs-foundation","description":"The Foundation Project, providing core utilities, internationalization, and OS independence","fork":true,"url":"https://api.github.com/repos/karwa/swift-corelibs-foundation","forks_url":"https://api.github.com/repos/karwa/swift-corelibs-foundation/forks","keys_url":"https://api.github.com/repos/karwa/swift-corelibs-foundation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/karwa/swift-corelibs-foundation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/karwa/swift-corelibs-foundation/teams","hooks_url":"https://api.github.com/repos/karwa/swift-corelibs-foundation/hooks","issue_events_url":"https://api.github.com/repos/karwa/swift-corelibs-foundation/issues/events{/number}","events_url":"https://api.github.com/repos/karwa/swift-corelibs-foundation/events","assignees_url":"https://api.github.com/repos/karwa/swift-corelibs-foundation/assignees{/user}","branches_url":"https://api.github.com/repos/karwa/swift-corelibs-foundation/branches{/branch}","tags_url":"https://api.github.com/repos/karwa/swift-corelibs-foundation/tags","blobs_url":"https://api.github.com/repos/karwa/swift-corelibs-foundation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/karwa/swift-corelibs-foundation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/karwa/swift-corelibs-foundation/git/refs{/sha}","trees_url":"https://api.github.com/repos/karwa/swift-corelibs-foundation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/karwa/swift-corelibs-foundation/statuses/{sha}","languages_url":"https://api.github.com/repos/karwa/swift-corelibs-foundation/languages","stargazers_url":"https://api.github.com/repos/karwa/swift-corelibs-foundation/stargazers","contributors_url":"https://api.github.com/repos/karwa/swift-corelibs-foundation/contributors","subscribers_url":"https://api.github.com/repos/karwa/swift-corelibs-foundation/subscribers","subscription_url":"https://api.github.com/repos/karwa/swift-corelibs-foundation/subscription","commits_url":"https://api.github.com/repos/karwa/swift-corelibs-foundation/commits{/sha}","git_commits_url":"https://api.github.com/repos/karwa/swift-corelibs-foundation/git/commits{/sha}","comments_url":"https://api.github.com/repos/karwa/swift-corelibs-foundation/comments{/number}","issue_comment_url":"https://api.github.com/repos/karwa/swift-corelibs-foundation/issues/comments{/number}","contents_url":"https://api.github.com/repos/karwa/swift-corelibs-foundation/contents/{+path}","compare_url":"https://api.github.com/repos/karwa/swift-corelibs-foundation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/karwa/swift-corelibs-foundation/merges","archive_url":"https://api.github.com/repos/karwa/swift-corelibs-foundation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/karwa/swift-corelibs-foundation/downloads","issues_url":"https://api.github.com/repos/karwa/swift-corelibs-foundation/issues{/number}","pulls_url":"https://api.github.com/repos/karwa/swift-corelibs-foundation/pulls{/number}","milestones_url":"https://api.github.com/repos/karwa/swift-corelibs-foundation/milestones{/number}","notifications_url":"https://api.github.com/repos/karwa/swift-corelibs-foundation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/karwa/swift-corelibs-foundation/labels{/name}","releases_url":"https://api.github.com/repos/karwa/swift-corelibs-foundation/releases{/id}","deployments_url":"https://api.github.com/repos/karwa/swift-corelibs-foundation/deployments","created_at":"2016-05-19T12:09:02Z","updated_at":"2016-05-19T12:09:06Z","pushed_at":"2018-06-03T17:11:48Z","git_url":"git://github.com/karwa/swift-corelibs-foundation.git","ssh_url":"git@github.com:karwa/swift-corelibs-foundation.git","clone_url":"https://github.com/karwa/swift-corelibs-foundation.git","svn_url":"https://github.com/karwa/swift-corelibs-foundation","homepage":"swift.org","size":5310,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apple:master","ref":"master","sha":"e78f47139adb1bf486e73920f11afd5e5082b340","user":{"login":"apple","id":10639145,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwNjM5MTQ1","avatar_url":"https://avatars0.githubusercontent.com/u/10639145?v=4","gravatar_id":"","url":"https://api.github.com/users/apple","html_url":"https://github.com/apple","followers_url":"https://api.github.com/users/apple/followers","following_url":"https://api.github.com/users/apple/following{/other_user}","gists_url":"https://api.github.com/users/apple/gists{/gist_id}","starred_url":"https://api.github.com/users/apple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apple/subscriptions","organizations_url":"https://api.github.com/users/apple/orgs","repos_url":"https://api.github.com/users/apple/repos","events_url":"https://api.github.com/users/apple/events{/privacy}","received_events_url":"https://api.github.com/users/apple/received_events","type":"Organization","site_admin":false},"repo":{"id":45863890,"node_id":"MDEwOlJlcG9zaXRvcnk0NTg2Mzg5MA==","name":"swift-corelibs-foundation","full_name":"apple/swift-corelibs-foundation","owner":{"login":"apple","id":10639145,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwNjM5MTQ1","avatar_url":"https://avatars0.githubusercontent.com/u/10639145?v=4","gravatar_id":"","url":"https://api.github.com/users/apple","html_url":"https://github.com/apple","followers_url":"https://api.github.com/users/apple/followers","following_url":"https://api.github.com/users/apple/following{/other_user}","gists_url":"https://api.github.com/users/apple/gists{/gist_id}","starred_url":"https://api.github.com/users/apple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apple/subscriptions","organizations_url":"https://api.github.com/users/apple/orgs","repos_url":"https://api.github.com/users/apple/repos","events_url":"https://api.github.com/users/apple/events{/privacy}","received_events_url":"https://api.github.com/users/apple/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apple/swift-corelibs-foundation","description":"The Foundation Project, providing core utilities, internationalization, and OS independence","fork":false,"url":"https://api.github.com/repos/apple/swift-corelibs-foundation","forks_url":"https://api.github.com/repos/apple/swift-corelibs-foundation/forks","keys_url":"https://api.github.com/repos/apple/swift-corelibs-foundation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apple/swift-corelibs-foundation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apple/swift-corelibs-foundation/teams","hooks_url":"https://api.github.com/repos/apple/swift-corelibs-foundation/hooks","issue_events_url":"https://api.github.com/repos/apple/swift-corelibs-foundation/issues/events{/number}","events_url":"https://api.github.com/repos/apple/swift-corelibs-foundation/events","assignees_url":"https://api.github.com/repos/apple/swift-corelibs-foundation/assignees{/user}","branches_url":"https://api.github.com/repos/apple/swift-corelibs-foundation/branches{/branch}","tags_url":"https://api.github.com/repos/apple/swift-corelibs-foundation/tags","blobs_url":"https://api.github.com/repos/apple/swift-corelibs-foundation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apple/swift-corelibs-foundation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apple/swift-corelibs-foundation/git/refs{/sha}","trees_url":"https://api.github.com/repos/apple/swift-corelibs-foundation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apple/swift-corelibs-foundation/statuses/{sha}","languages_url":"https://api.github.com/repos/apple/swift-corelibs-foundation/languages","stargazers_url":"https://api.github.com/repos/apple/swift-corelibs-foundation/stargazers","contributors_url":"https://api.github.com/repos/apple/swift-corelibs-foundation/contributors","subscribers_url":"https://api.github.com/repos/apple/swift-corelibs-foundation/subscribers","subscription_url":"https://api.github.com/repos/apple/swift-corelibs-foundation/subscription","commits_url":"https://api.github.com/repos/apple/swift-corelibs-foundation/commits{/sha}","git_commits_url":"https://api.github.com/repos/apple/swift-corelibs-foundation/git/commits{/sha}","comments_url":"https://api.github.com/repos/apple/swift-corelibs-foundation/comments{/number}","issue_comment_url":"https://api.github.com/repos/apple/swift-corelibs-foundation/issues/comments{/number}","contents_url":"https://api.github.com/repos/apple/swift-corelibs-foundation/contents/{+path}","compare_url":"https://api.github.com/repos/apple/swift-corelibs-foundation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apple/swift-corelibs-foundation/merges","archive_url":"https://api.github.com/repos/apple/swift-corelibs-foundation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apple/swift-corelibs-foundation/downloads","issues_url":"https://api.github.com/repos/apple/swift-corelibs-foundation/issues{/number}","pulls_url":"https://api.github.com/repos/apple/swift-corelibs-foundation/pulls{/number}","milestones_url":"https://api.github.com/repos/apple/swift-corelibs-foundation/milestones{/number}","notifications_url":"https://api.github.com/repos/apple/swift-corelibs-foundation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apple/swift-corelibs-foundation/labels{/name}","releases_url":"https://api.github.com/repos/apple/swift-corelibs-foundation/releases{/id}","deployments_url":"https://api.github.com/repos/apple/swift-corelibs-foundation/deployments","created_at":"2015-11-09T20:12:23Z","updated_at":"2018-06-03T15:25:39Z","pushed_at":"2018-06-03T13:48:03Z","git_url":"git://github.com/apple/swift-corelibs-foundation.git","ssh_url":"git@github.com:apple/swift-corelibs-foundation.git","clone_url":"https://github.com/apple/swift-corelibs-foundation.git","svn_url":"https://github.com/apple/swift-corelibs-foundation","homepage":"swift.org","size":12985,"stargazers_count":2951,"watchers_count":2951,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":712,"mirror_url":null,"archived":false,"open_issues_count":33,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":712,"open_issues":33,"watchers":2951,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apple/swift-corelibs-foundation/pulls/1576"},"html":{"href":"https://github.com/apple/swift-corelibs-foundation/pull/1576"},"issue":{"href":"https://api.github.com/repos/apple/swift-corelibs-foundation/issues/1576"},"comments":{"href":"https://api.github.com/repos/apple/swift-corelibs-foundation/issues/1576/comments"},"review_comments":{"href":"https://api.github.com/repos/apple/swift-corelibs-foundation/pulls/1576/comments"},"review_comment":{"href":"https://api.github.com/repos/apple/swift-corelibs-foundation/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apple/swift-corelibs-foundation/pulls/1576/commits"},"statuses":{"href":"https://api.github.com/repos/apple/swift-corelibs-foundation/statuses/da819fa37f86cd79ff5d931eb47cad6ecfe059c4"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":8,"deletions":11,"changed_files":1}}
{"actor":{"display_login":"karwa"}}